Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
18bb95b6
Commit
18bb95b6
authored
Mar 14, 2022
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.7 into 10.8
parents
00021a92
e67d46e4
Changes
40
Hide whitespace changes
Inline
Side-by-side
Showing
40 changed files
with
468 additions
and
174 deletions
+468
-174
include/my_valgrind.h
include/my_valgrind.h
+9
-1
mysys/my_lib.c
mysys/my_lib.c
+15
-5
mysys/my_symlink.c
mysys/my_symlink.c
+5
-2
sql/datadict.cc
sql/datadict.cc
+2
-0
sql/ddl_log.cc
sql/ddl_log.cc
+4
-4
sql/discover.cc
sql/discover.cc
+2
-1
sql/parse_file.cc
sql/parse_file.cc
+2
-0
sql/sql_parse.cc
sql/sql_parse.cc
+1
-1
storage/innobase/buf/buf0rea.cc
storage/innobase/buf/buf0rea.cc
+1
-1
storage/innobase/log/log0log.cc
storage/innobase/log/log0log.cc
+9
-4
storage/innobase/os/os0file.cc
storage/innobase/os/os0file.cc
+19
-5
storage/innobase/trx/trx0purge.cc
storage/innobase/trx/trx0purge.cc
+2
-2
storage/maria/s3_func.h
storage/maria/s3_func.h
+0
-1
storage/myisam/mi_info.c
storage/myisam/mi_info.c
+3
-0
storage/spider/mysql-test/spider/bg/r/spider3_fixes.result
storage/spider/mysql-test/spider/bg/r/spider3_fixes.result
+5
-0
storage/spider/mysql-test/spider/bg/r/spider3_fixes_part.result
...e/spider/mysql-test/spider/bg/r/spider3_fixes_part.result
+5
-0
storage/spider/mysql-test/spider/bg/r/spider_fixes.result
storage/spider/mysql-test/spider/bg/r/spider_fixes.result
+15
-0
storage/spider/mysql-test/spider/bg/t/spider3_fixes.test
storage/spider/mysql-test/spider/bg/t/spider3_fixes.test
+3
-0
storage/spider/mysql-test/spider/bg/t/spider3_fixes_part.test
...age/spider/mysql-test/spider/bg/t/spider3_fixes_part.test
+3
-0
storage/spider/mysql-test/spider/bg/t/spider_fixes.test
storage/spider/mysql-test/spider/bg/t/spider_fixes.test
+9
-0
storage/spider/mysql-test/spider/handler/r/spider3_fixes.result
...e/spider/mysql-test/spider/handler/r/spider3_fixes.result
+5
-0
storage/spider/mysql-test/spider/handler/r/spider3_fixes_part.result
...der/mysql-test/spider/handler/r/spider3_fixes_part.result
+5
-0
storage/spider/mysql-test/spider/handler/r/spider_fixes.result
...ge/spider/mysql-test/spider/handler/r/spider_fixes.result
+20
-0
storage/spider/mysql-test/spider/handler/r/spider_fixes_part.result
...ider/mysql-test/spider/handler/r/spider_fixes_part.result
+5
-0
storage/spider/mysql-test/spider/handler/t/spider3_fixes.test
...age/spider/mysql-test/spider/handler/t/spider3_fixes.test
+3
-0
storage/spider/mysql-test/spider/handler/t/spider3_fixes_part.test
...pider/mysql-test/spider/handler/t/spider3_fixes_part.test
+3
-0
storage/spider/mysql-test/spider/handler/t/spider_fixes.test
storage/spider/mysql-test/spider/handler/t/spider_fixes.test
+12
-0
storage/spider/mysql-test/spider/handler/t/spider_fixes_part.test
...spider/mysql-test/spider/handler/t/spider_fixes_part.test
+3
-0
storage/spider/mysql-test/spider/r/spider_fixes.result
storage/spider/mysql-test/spider/r/spider_fixes.result
+15
-0
storage/spider/mysql-test/spider/r/variable_deprecation.result
...ge/spider/mysql-test/spider/r/variable_deprecation.result
+38
-0
storage/spider/mysql-test/spider/t/spider_fixes.test
storage/spider/mysql-test/spider/t/spider_fixes.test
+9
-0
storage/spider/mysql-test/spider/t/variable_deprecation.test
storage/spider/mysql-test/spider/t/variable_deprecation.test
+27
-0
storage/spider/spd_param.cc
storage/spider/spd_param.cc
+133
-119
storage/spider/spd_table.cc
storage/spider/spd_table.cc
+12
-0
strings/my_vsnprintf.c
strings/my_vsnprintf.c
+2
-1
tpool/aio_liburing.cc
tpool/aio_liburing.cc
+2
-0
tpool/aio_linux.cc
tpool/aio_linux.cc
+2
-0
tpool/aio_simulated.cc
tpool/aio_simulated.cc
+1
-26
tpool/tpool.h
tpool/tpool.h
+5
-1
tpool/tpool_generic.cc
tpool/tpool_generic.cc
+52
-0
No files found.
include/my_valgrind.h
View file @
18bb95b6
/* Copyright (C) 2010, 202
0
, MariaDB Corporation.
/* Copyright (C) 2010, 202
2
, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
...
...
@@ -37,6 +37,11 @@
# define MEM_GET_VBITS(a,b,len) __msan_copy_shadow(b,a,len)
# define MEM_SET_VBITS(a,b,len) __msan_copy_shadow(a,b,len)
# define REDZONE_SIZE 8
# ifdef __linux__
# define MSAN_STAT_WORKAROUND(st) MEM_MAKE_DEFINED(st, sizeof(*st))
# else
# define MSAN_STAT_WORKAROUND(st) ((void) 0)
# endif
#elif defined(HAVE_VALGRIND_MEMCHECK_H) && defined(HAVE_valgrind)
# include <valgrind/memcheck.h>
# define HAVE_MEM_CHECK
...
...
@@ -49,6 +54,7 @@
# define MEM_GET_VBITS(a,b,len) VALGRIND_GET_VBITS(a,b,len)
# define MEM_SET_VBITS(a,b,len) VALGRIND_SET_VBITS(a,b,len)
# define REDZONE_SIZE 8
# define MSAN_STAT_WORKAROUND(st) ((void) 0)
#elif defined(__SANITIZE_ADDRESS__) && (!defined(_MSC_VER) || defined (__clang__))
# include <sanitizer/asan_interface.h>
/* How to do manual poisoning:
...
...
@@ -62,6 +68,7 @@
# define MEM_CHECK_DEFINED(a,len) ((void) 0)
# define MEM_GET_VBITS(a,b,len) ((void) 0)
# define MEM_SET_VBITS(a,b,len) ((void) 0)
# define MSAN_STAT_WORKAROUND(st) ((void) 0)
# define REDZONE_SIZE 8
#else
# define MEM_UNDEFINED(a,len) ((void) 0)
...
...
@@ -73,6 +80,7 @@
# define MEM_GET_VBITS(a,b,len) ((void) 0)
# define MEM_SET_VBITS(a,b,len) ((void) 0)
# define REDZONE_SIZE 0
# define MSAN_STAT_WORKAROUND(st) ((void) 0)
#endif
/* __has_feature(memory_sanitizer) */
#ifdef HAVE_valgrind
...
...
mysys/my_lib.c
View file @
18bb95b6
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2008, 202
0
, MariaDB Corporation.
Copyright (c) 2008, 202
2
, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
...
...
@@ -332,6 +332,13 @@ int my_fstat(File Filedes, MY_STAT *stat_area,
DBUG_PRINT
(
"my"
,(
"fd: %d MyFlags: %lu"
,
Filedes
,
MyFlags
));
#ifdef _WIN32
DBUG_RETURN
(
my_win_fstat
(
Filedes
,
stat_area
));
#elif defined HAVE_valgrind
{
int
s
=
fstat
(
Filedes
,
stat_area
);
if
(
!
s
)
MSAN_STAT_WORKAROUND
(
stat_area
);
DBUG_RETURN
(
s
);
}
#else
DBUG_RETURN
(
fstat
(
Filedes
,
(
struct
stat
*
)
stat_area
));
#endif
...
...
@@ -350,11 +357,14 @@ MY_STAT *my_stat(const char *path, MY_STAT *stat_area, myf my_flags)
my_flags
)))
goto
error
;
#ifndef _WIN32
if
(
!
stat
((
char
*
)
path
,
(
struct
stat
*
)
stat_area
)
)
DBUG_RETURN
(
stat_area
);
if
(
!
stat
((
char
*
)
path
,
(
struct
stat
*
)
stat_area
))
{
MSAN_STAT_WORKAROUND
(
stat_area
);
DBUG_RETURN
(
stat_area
);
}
#else
if
(
!
my_win_stat
(
path
,
stat_area
)
)
DBUG_RETURN
(
stat_area
);
if
(
!
my_win_stat
(
path
,
stat_area
)
)
DBUG_RETURN
(
stat_area
);
#endif
DBUG_PRINT
(
"error"
,(
"Got errno: %d from stat"
,
errno
));
my_errno
=
errno
;
...
...
mysys/my_symlink.c
View file @
18bb95b6
/*
Copyright (c) 2001, 2011, Oracle and/or its affiliates
Copyright (c) 2010, 20
17
, MariaDB
Copyright (c) 2010, 20
22
, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
...
...
@@ -113,7 +113,10 @@ int my_is_symlink(const char *filename __attribute__((unused)))
{
#if defined (HAVE_LSTAT) && defined (S_ISLNK)
struct
stat
stat_buff
;
return
!
lstat
(
filename
,
&
stat_buff
)
&&
S_ISLNK
(
stat_buff
.
st_mode
);
if
(
lstat
(
filename
,
&
stat_buff
))
return
0
;
MSAN_STAT_WORKAROUND
(
&
stat_buff
);
return
!!
S_ISLNK
(
stat_buff
.
st_mode
);
#elif defined (_WIN32)
DWORD
dwAttr
=
GetFileAttributes
(
filename
);
return
(
dwAttr
!=
INVALID_FILE_ATTRIBUTES
)
&&
...
...
sql/datadict.cc
View file @
18bb95b6
...
...
@@ -163,6 +163,8 @@ Table_type dd_frm_type(THD *thd, char *path, LEX_CSTRING *engine_name,
if
(
mysql_file_fstat
(
file
,
&
state
,
MYF
(
MY_WME
)))
goto
err
;
MSAN_STAT_WORKAROUND
(
&
state
);
if
(
mysql_file_seek
(
file
,
0
,
SEEK_SET
,
MYF
(
MY_WME
)))
goto
err
;
...
...
sql/ddl_log.cc
View file @
18bb95b6
...
...
@@ -2491,11 +2491,11 @@ bool ddl_log_write_entry(DDL_LOG_ENTRY *ddl_log_entry,
if
(
unlikely
(
write_ddl_log_file_entry
((
*
active_entry
)
->
entry_pos
)))
{
sql_print_error
(
"DDL_LOG: Failed to write entry %u"
,
(
*
active_entry
)
->
entry_pos
);
ddl_log_release_memory_entry
(
*
active_entry
);
*
active_entry
=
0
;
error
=
TRUE
;
sql_print_error
(
"DDL_LOG: Failed to write entry %u"
,
(
*
active_entry
)
->
entry_pos
);
}
DBUG_RETURN
(
error
);
}
...
...
@@ -2558,13 +2558,13 @@ bool ddl_log_write_execute_entry(uint first_entry,
(
*
active_entry
)
->
entry_pos
,
first_entry
));
if
(
write_ddl_log_file_entry
((
*
active_entry
)
->
entry_pos
))
{
sql_print_error
(
"DDL_LOG: Error writing execute entry %u"
,
(
*
active_entry
)
->
entry_pos
);
if
(
got_free_entry
)
{
ddl_log_release_memory_entry
(
*
active_entry
);
*
active_entry
=
0
;
}
sql_print_error
(
"DDL_LOG: Error writing execute entry %u"
,
(
*
active_entry
)
->
entry_pos
);
DBUG_RETURN
(
TRUE
);
}
(
void
)
ddl_log_sync_no_lock
();
...
...
sql/discover.cc
View file @
18bb95b6
/* Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2009, 202
0
, MariaDB Corporation.
Copyright (c) 2009, 202
2
, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
...
...
@@ -72,6 +72,7 @@ int readfrm(const char *name, const uchar **frmdata, size_t *len)
error
=
2
;
if
(
mysql_file_fstat
(
file
,
&
state
,
MYF
(
0
)))
goto
err
;
MSAN_STAT_WORKAROUND
(
&
state
);
read_len
=
(
size_t
)
MY_MIN
(
FRM_MAX_SIZE
,
state
.
st_size
);
// safety
// Read whole frm file
...
...
sql/parse_file.cc
View file @
18bb95b6
...
...
@@ -464,6 +464,8 @@ sql_parse_prepare(const LEX_CSTRING *file_name, MEM_ROOT *mem_root,
DBUG_RETURN
(
0
);
}
MSAN_STAT_WORKAROUND
(
&
stat_info
);
if
(
stat_info
.
st_size
>
INT_MAX
-
1
)
{
my_error
(
ER_FPARSER_TOO_BIG_FILE
,
MYF
(
0
),
file_name
->
str
);
...
...
sql/sql_parse.cc
View file @
18bb95b6
...
...
@@ -1188,7 +1188,7 @@ static enum enum_server_command fetch_command(THD *thd, char *packet)
DISPATCH_COMMAND_CLOSE_CONNECTION request of THD shutdown
(s. dispatch_command() description)
@retval
DISPATCH_COMMAND_WOULDBLOCK - need to wait for asyncronous operations
DISPATCH_COMMAND_WOULDBLOCK - need to wait for async
h
ronous operations
to finish. Only returned if parameter
'blocking' is false.
*/
...
...
storage/innobase/buf/buf0rea.cc
View file @
18bb95b6
...
...
@@ -290,7 +290,7 @@ buf_read_page_low(
/* Trx sys header is so low in the latching order that we play
safe and do not leave the i/o-completion to an asynchronous
i/o-thread. Change buffer pages must always be read with
syncronous i/o, to make sure they do not get involved in
sync
h
ronous i/o, to make sure they do not get involved in
thread deadlocks. */
sync
=
true
;
}
...
...
storage/innobase/log/log0log.cc
View file @
18bb95b6
...
...
@@ -188,11 +188,16 @@ void log_t::attach(log_file_t file, os_offset_t size)
struct
stat
st
;
if
(
!
fstat
(
log
.
m_file
,
&
st
))
{
MSAN_STAT_WORKAROUND
(
&
st
);
const
auto
st_dev
=
st
.
st_dev
;
if
(
!
stat
(
"/dev/shm"
,
&
st
)
&&
st
.
st_dev
==
st_dev
)
ptr
=
my_mmap
(
0
,
size_t
(
size
),
srv_read_only_mode
?
PROT_READ
:
PROT_READ
|
PROT_WRITE
,
MAP_SHARED
,
log
.
m_file
,
0
);
if
(
!
stat
(
"/dev/shm"
,
&
st
))
{
MSAN_STAT_WORKAROUND
(
&
st
);
if
(
st
.
st_dev
==
st_dev
)
ptr
=
my_mmap
(
0
,
size_t
(
size
),
srv_read_only_mode
?
PROT_READ
:
PROT_READ
|
PROT_WRITE
,
MAP_SHARED
,
log
.
m_file
,
0
);
}
}
}
#endif
/* __linux__ */
...
...
storage/innobase/os/os0file.cc
View file @
18bb95b6
...
...
@@ -932,7 +932,7 @@ os_file_status_posix(
if
(
!
ret
)
{
/* file exists, everything OK */
MSAN_STAT_WORKAROUND
(
&
statinfo
);
}
else
if
(
errno
==
ENOENT
||
errno
==
ENOTDIR
||
errno
==
ENAMETOOLONG
)
{
/* file does not exist */
return
(
true
);
...
...
@@ -1309,7 +1309,11 @@ os_file_create_func(
char
b
[
20
+
sizeof
"/sys/dev/block/"
":"
"/../queue/physical_block_size"
];
int
f
;
if
(
fstat
(
file
,
&
st
)
||
st
.
st_size
&
4095
)
{
if
(
fstat
(
file
,
&
st
))
{
goto
skip_o_direct
;
}
MSAN_STAT_WORKAROUND
(
&
st
);
if
(
st
.
st_size
&
4095
)
{
goto
skip_o_direct
;
}
if
(
snprintf
(
b
,
sizeof
b
,
...
...
@@ -1588,8 +1592,10 @@ bool os_file_close_func(os_file_t file)
os_offset_t
os_file_get_size
(
os_file_t
file
)
{
struct
stat
statbuf
;
return
fstat
(
file
,
&
statbuf
)
?
os_offset_t
(
-
1
)
:
statbuf
.
st_size
;
struct
stat
statbuf
;
if
(
fstat
(
file
,
&
statbuf
))
return
os_offset_t
(
-
1
);
MSAN_STAT_WORKAROUND
(
&
statbuf
);
return
statbuf
.
st_size
;
}
/** Gets a file size.
...
...
@@ -1606,6 +1612,7 @@ os_file_get_size(
int
ret
=
stat
(
filename
,
&
s
);
if
(
ret
==
0
)
{
MSAN_STAT_WORKAROUND
(
&
s
);
file_size
.
m_total_size
=
s
.
st_size
;
/* st_blocks is in 512 byte sized blocks */
file_size
.
m_alloc_size
=
s
.
st_blocks
*
512
;
...
...
@@ -1650,6 +1657,8 @@ os_file_get_status_posix(
return
(
DB_FAIL
);
}
MSAN_STAT_WORKAROUND
(
statinfo
);
switch
(
statinfo
->
st_mode
&
S_IFMT
)
{
case
S_IFDIR
:
stat_info
->
type
=
OS_FILE_TYPE_DIR
;
...
...
@@ -2763,7 +2772,7 @@ os_file_set_eof(
#endif
/* !_WIN32*/
/** Does a syncronous read or write depending upon the type specified
/** Does a sync
h
ronous read or write depending upon the type specified
In case of partial reads/writes the function tries
NUM_RETRIES_ON_PARTIAL_IO times to read/write the complete data.
@param[in] type, IO flags
...
...
@@ -3249,6 +3258,7 @@ os_file_set_size(
if
(
fstat
(
file
,
&
statbuf
))
{
err
=
errno
;
}
else
{
MSAN_STAT_WORKAROUND
(
&
statbuf
);
os_offset_t
current_size
=
statbuf
.
st_size
;
if
(
current_size
>=
size
)
{
return
true
;
...
...
@@ -4126,7 +4136,10 @@ void fil_node_t::find_metadata(os_file_t file
#else
struct
stat
sbuf
;
if
(
!
statbuf
&&
!
fstat
(
file
,
&
sbuf
))
{
MSAN_STAT_WORKAROUND
(
&
sbuf
);
statbuf
=
&
sbuf
;
}
if
(
statbuf
)
block_size
=
statbuf
->
st_blksize
;
# ifdef UNIV_LINUX
...
...
@@ -4159,6 +4172,7 @@ bool fil_node_t::read_page0()
struct
stat
statbuf
;
if
(
fstat
(
handle
,
&
statbuf
))
return
false
;
MSAN_STAT_WORKAROUND
(
&
statbuf
);
os_offset_t
size_bytes
=
statbuf
.
st_size
;
#else
os_offset_t
size_bytes
=
os_file_get_size
(
handle
);
...
...
storage/innobase/trx/trx0purge.cc
View file @
18bb95b6
...
...
@@ -119,7 +119,7 @@ TRANSACTIONAL_INLINE inline bool TrxUndoRsegsIterator::set_next()
trx_id_t
last_trx_no
,
tail_trx_no
;
{
#ifdef SUX_LOCK_GENERIC
purge_sys
.
rseg
->
latch
.
rd_lock
();
purge_sys
.
rseg
->
latch
.
rd_lock
(
SRW_LOCK_CALL
);
#else
transactional_shared_lock_guard
<
srw_spin_lock
>
rg
{
purge_sys
.
rseg
->
latch
};
...
...
@@ -636,7 +636,7 @@ TRANSACTIONAL_TARGET static void trx_purge_truncate_history()
if
(
rseg
.
space
!=
&
space
)
continue
;
#ifdef SUX_LOCK_GENERIC
rseg
.
latch
.
rd_lock
();
rseg
.
latch
.
rd_lock
(
SRW_LOCK_CALL
);
#else
transactional_shared_lock_guard
<
srw_spin_lock
>
g
{
rseg
.
latch
};
#endif
...
...
storage/maria/s3_func.h
View file @
18bb95b6
...
...
@@ -141,7 +141,6 @@ C_MODE_END
C_MODE_START
/* Dummy structures and interfaces to be used when compiling without S3 */
struct
s3_info
;
typedef
struct
s3_info
S3_INFO
;
struct
ms3_st
;
C_MODE_END
#endif
/* WITH_S3_STORAGE_ENGINE */
...
...
storage/myisam/mi_info.c
View file @
18bb95b6
...
...
@@ -87,7 +87,10 @@ int mi_status(MI_INFO *info, register MI_ISAMINFO *x, uint flag)
x
->
index_file_name
=
share
->
index_file_name
;
}
if
((
flag
&
HA_STATUS_TIME
)
&&
!
mysql_file_fstat
(
info
->
dfile
,
&
state
,
MYF
(
0
)))
{
MSAN_STAT_WORKAROUND
(
&
state
);
x
->
update_time
=
state
.
st_mtime
;
}
else
x
->
update_time
=
0
;
if
(
flag
&
HA_STATUS_AUTO
)
...
...
storage/spider/mysql-test/spider/bg/r/spider3_fixes.result
View file @
18bb95b6
...
...
@@ -36,6 +36,10 @@ SELECT 1;
3.1
auto_increment
connection master_1;
SET @original_spider_auto_increment_mode = @@SESSION.spider_auto_increment_mode;
SET SESSION spider_auto_increment_mode = -1;
Warnings:
Warning 138 The option value -1 (use table value) is deprecated and will be removed in a future release
connection slave1_1;
connection master_1;
DROP TABLE IF EXISTS t1, t2;
...
...
@@ -190,6 +194,7 @@ LAST_INSERT_ID()
SELECT MAX(id) FROM t2;
MAX(id)
10000
SET SESSION spider_auto_increment_mode = @original_spider_auto_increment_mode;
connection slave1_1;
SELECT id FROM t1 ORDER BY id;
id
...
...
storage/spider/mysql-test/spider/bg/r/spider3_fixes_part.result
View file @
18bb95b6
...
...
@@ -34,6 +34,10 @@ SELECT 1;
1
auto_increment with partition
connection master_1;
SET @original_spider_auto_increment_mode = @@SESSION.spider_auto_increment_mode;
SET SESSION spider_auto_increment_mode = -1;
Warnings:
Warning 138 The option value -1 (use table value) is deprecated and will be removed in a future release
connection slave1_1;
connection master_1;
DROP TABLE IF EXISTS t1, t2;
...
...
@@ -188,6 +192,7 @@ LAST_INSERT_ID()
SELECT MAX(id) FROM t2;
MAX(id)
10000
SET SESSION spider_auto_increment_mode = @original_spider_auto_increment_mode;
connection slave1_1;
SELECT id FROM t1 ORDER BY id;
id
...
...
storage/spider/mysql-test/spider/bg/r/spider_fixes.result
View file @
18bb95b6
...
...
@@ -413,6 +413,10 @@ connection master_1;
read only
connection master_1;
SET @original_spider_read_only_mode = @@SESSION.spider_read_only_mode;
SET SESSION spider_read_only_mode = -1;
Warnings:
Warning 138 The option value -1 (use table value) is deprecated and will be removed in a future release
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
id int(11) NOT NULL,
...
...
@@ -441,10 +445,19 @@ DELETE FROM t1;
ERROR HY000: Table 'auto_test_local.t1' is read only
TRUNCATE t1;
ERROR HY000: Table 'auto_test_local.t1' is read only
SET SESSION spider_read_only_mode = @original_spider_read_only_mode;
2.27
error mode
connection master_1;
SET @original_spider_error_read_mode = @@SESSION.spider_error_read_mode;
SET @original_spider_error_write_mode = @@SESSION.spider_error_write_mode;
SET SESSION spider_error_read_mode = -1;
Warnings:
Warning 138 The option value -1 (use table value) is deprecated and will be removed in a future release
SET SESSION spider_error_write_mode = -1;
Warnings:
Warning 138 The option value -1 (use table value) is deprecated and will be removed in a future release
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
id int(11) NOT NULL,
...
...
@@ -466,6 +479,8 @@ Error 1146 Table 'auto_test_remote.ter1_1' doesn't exist
TRUNCATE t1;
Warnings:
Error 1146 Table 'auto_test_remote.ter1_1' doesn't exist
SET SESSION spider_error_read_mode = @original_spider_error_read_mode;
SET SESSION spider_error_write_mode = @original_spider_error_write_mode;
3.0
is null
...
...
storage/spider/mysql-test/spider/bg/t/spider3_fixes.test
View file @
18bb95b6
...
...
@@ -97,6 +97,8 @@ if ($USE_CHILD_GROUP2)
}
}
--
connection
master_1
SET
@
original_spider_auto_increment_mode
=
@@
SESSION
.
spider_auto_increment_mode
;
SET
SESSION
spider_auto_increment_mode
=
-
1
;
if
(
$USE_REPLICATION
)
{
save_master_pos
;
...
...
@@ -222,6 +224,7 @@ SELECT MAX(id) FROM t1;
INSERT
INTO
t2
(
id
)
VALUES
(
1000
);
SELECT
LAST_INSERT_ID
();
SELECT
MAX
(
id
)
FROM
t2
;
SET
SESSION
spider_auto_increment_mode
=
@
original_spider_auto_increment_mode
;
if
(
$USE_REPLICATION
)
{
save_master_pos
;
...
...
storage/spider/mysql-test/spider/bg/t/spider3_fixes_part.test
View file @
18bb95b6
...
...
@@ -131,6 +131,8 @@ if ($HAVE_PARTITION)
}
}
--
connection
master_1
SET
@
original_spider_auto_increment_mode
=
@@
SESSION
.
spider_auto_increment_mode
;
SET
SESSION
spider_auto_increment_mode
=
-
1
;
if
(
$USE_REPLICATION
)
{
save_master_pos
;
...
...
@@ -256,6 +258,7 @@ if ($HAVE_PARTITION)
INSERT
INTO
t2
(
id
)
VALUES
(
1000
);
SELECT
LAST_INSERT_ID
();
SELECT
MAX
(
id
)
FROM
t2
;
SET
SESSION
spider_auto_increment_mode
=
@
original_spider_auto_increment_mode
;
if
(
$USE_REPLICATION
)
{
save_master_pos
;
...
...
storage/spider/mysql-test/spider/bg/t/spider_fixes.test
View file @
18bb95b6
...
...
@@ -1172,6 +1172,8 @@ let $MASTER_1_ENGINE_IS_SPIDER=
if
(
$MASTER_1_ENGINE_IS_SPIDER
)
{
--
connection
master_1
SET
@
original_spider_read_only_mode
=
@@
SESSION
.
spider_read_only_mode
;
SET
SESSION
spider_read_only_mode
=
-
1
;
--
disable_warnings
DROP
TABLE
IF
EXISTS
t1
;
--
enable_warnings
...
...
@@ -1197,6 +1199,7 @@ if ($MASTER_1_ENGINE_IS_SPIDER)
DELETE
FROM
t1
;
--
error
12518
TRUNCATE
t1
;
SET
SESSION
spider_read_only_mode
=
@
original_spider_read_only_mode
;
}
if
(
!
$MASTER_1_ENGINE_IS_SPIDER
)
{
...
...
@@ -1210,6 +1213,10 @@ if (!$MASTER_1_ENGINE_IS_SPIDER)
if
(
$MASTER_1_ENGINE_IS_SPIDER
)
{
--
connection
master_1
SET
@
original_spider_error_read_mode
=
@@
SESSION
.
spider_error_read_mode
;
SET
@
original_spider_error_write_mode
=
@@
SESSION
.
spider_error_write_mode
;
SET
SESSION
spider_error_read_mode
=
-
1
;
SET
SESSION
spider_error_write_mode
=
-
1
;
--
disable_warnings
DROP
TABLE
IF
EXISTS
t1
;
--
enable_warnings
...
...
@@ -1227,6 +1234,8 @@ if ($MASTER_1_ENGINE_IS_SPIDER)
INSERT
INTO
t1
(
id
)
VALUES
(
1
);
DELETE
FROM
t1
;
TRUNCATE
t1
;
SET
SESSION
spider_error_read_mode
=
@
original_spider_error_read_mode
;
SET
SESSION
spider_error_write_mode
=
@
original_spider_error_write_mode
;
}
if
(
!
$MASTER_1_ENGINE_IS_SPIDER
)
{
...
...
storage/spider/mysql-test/spider/handler/r/spider3_fixes.result
View file @
18bb95b6
...
...
@@ -36,6 +36,10 @@ SELECT 1;
3.1
auto_increment
connection master_1;
SET @original_spider_auto_increment_mode = @@SESSION.spider_auto_increment_mode;
SET SESSION spider_auto_increment_mode = -1;
Warnings:
Warning 138 The option value -1 (use table value) is deprecated and will be removed in a future release
connection slave1_1;
connection master_1;
DROP TABLE IF EXISTS t1, t2;
...
...
@@ -206,6 +210,7 @@ LAST_INSERT_ID()
SELECT MAX(id) FROM t2;
MAX(id)
46
SET SESSION spider_auto_increment_mode = @original_spider_auto_increment_mode;
connection slave1_1;
SELECT id FROM t1 ORDER BY id;
id
...
...
storage/spider/mysql-test/spider/handler/r/spider3_fixes_part.result
View file @
18bb95b6
...
...
@@ -34,6 +34,10 @@ SELECT 1;
1
auto_increment with partition
connection master_1;
SET @original_spider_auto_increment_mode = @@SESSION.spider_auto_increment_mode;
SET SESSION spider_auto_increment_mode = -1;
Warnings:
Warning 138 The option value -1 (use table value) is deprecated and will be removed in a future release
connection slave1_1;
connection master_1;
DROP TABLE IF EXISTS t1, t2;
...
...
@@ -204,6 +208,7 @@ LAST_INSERT_ID()
SELECT MAX(id) FROM t2;
MAX(id)
26
SET SESSION spider_auto_increment_mode = @original_spider_auto_increment_mode;
connection slave1_1;
SELECT id FROM t1 ORDER BY id;
id
...
...
storage/spider/mysql-test/spider/handler/r/spider_fixes.result
View file @
18bb95b6
...
...
@@ -306,6 +306,10 @@ UNLOCK TABLES;
auto_increment
connection master_1;
SET @original_spider_auto_increment_mode = @@SESSION.spider_auto_increment_mode;
SET SESSION spider_auto_increment_mode = -1;
Warnings:
Warning 138 The option value -1 (use table value) is deprecated and will be removed in a future release
connection slave1_1;
connection master_1;
DROP TABLE IF EXISTS t1;
...
...
@@ -399,6 +403,7 @@ LAST_INSERT_ID()
SELECT MAX(id) FROM t1;
MAX(id)
42
SET SESSION spider_auto_increment_mode = @original_spider_auto_increment_mode;
connection slave1_1;
SELECT id FROM t1 ORDER BY id;
id
...
...
@@ -417,6 +422,10 @@ connection master_1;
read only
connection master_1;
SET @original_spider_read_only_mode = @@SESSION.spider_read_only_mode;
SET SESSION spider_read_only_mode = -1;
Warnings:
Warning 138 The option value -1 (use table value) is deprecated and will be removed in a future release
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
id int(11) NOT NULL,
...
...
@@ -445,10 +454,19 @@ DELETE FROM t1;
ERROR HY000: Table 'auto_test_local.t1' is read only
TRUNCATE t1;
ERROR HY000: Table 'auto_test_local.t1' is read only
SET SESSION spider_read_only_mode = @original_spider_read_only_mode;
2.27
error mode
connection master_1;
SET @original_spider_error_read_mode = @@SESSION.spider_error_read_mode;
SET @original_spider_error_write_mode = @@SESSION.spider_error_write_mode;
SET SESSION spider_error_read_mode = -1;
Warnings:
Warning 138 The option value -1 (use table value) is deprecated and will be removed in a future release
SET SESSION spider_error_write_mode = -1;
Warnings:
Warning 138 The option value -1 (use table value) is deprecated and will be removed in a future release
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
id int(11) NOT NULL,
...
...
@@ -470,6 +488,8 @@ Error 1146 Table 'auto_test_remote.ter1_1' doesn't exist
TRUNCATE t1;
Warnings:
Error 1146 Table 'auto_test_remote.ter1_1' doesn't exist
SET SESSION spider_error_read_mode = @original_spider_error_read_mode;
SET SESSION spider_error_write_mode = @original_spider_error_write_mode;
3.0
is null
...
...
storage/spider/mysql-test/spider/handler/r/spider_fixes_part.result
View file @
18bb95b6
...
...
@@ -109,6 +109,10 @@ a b c
2.26
auto_increment with partition
connection master_1;
SET @original_spider_auto_increment_mode = @@SESSION.spider_auto_increment_mode;
SET SESSION spider_auto_increment_mode = -1;
Warnings:
Warning 138 The option value -1 (use table value) is deprecated and will be removed in a future release
connection slave1_1;
connection master_1;
DROP TABLE IF EXISTS t1;
...
...
@@ -202,6 +206,7 @@ LAST_INSERT_ID()
SELECT MAX(id) FROM t1;
MAX(id)
26
SET SESSION spider_auto_increment_mode = @original_spider_auto_increment_mode;
connection slave1_1;
SELECT id FROM t1 ORDER BY id;
id
...
...
storage/spider/mysql-test/spider/handler/t/spider3_fixes.test
View file @
18bb95b6
...
...
@@ -97,6 +97,8 @@ if ($USE_CHILD_GROUP2)
}
}
--
connection
master_1
SET
@
original_spider_auto_increment_mode
=
@@
SESSION
.
spider_auto_increment_mode
;
SET
SESSION
spider_auto_increment_mode
=
-
1
;
if
(
$USE_REPLICATION
)
{
save_master_pos
;
...
...
@@ -222,6 +224,7 @@ SELECT MAX(id) FROM t1;
INSERT
INTO
t2
(
id
)
VALUES
(
1000
);
SELECT
LAST_INSERT_ID
();
SELECT
MAX
(
id
)
FROM
t2
;
SET
SESSION
spider_auto_increment_mode
=
@
original_spider_auto_increment_mode
;
if
(
$USE_REPLICATION
)
{
save_master_pos
;
...
...
storage/spider/mysql-test/spider/handler/t/spider3_fixes_part.test
View file @
18bb95b6
...
...
@@ -131,6 +131,8 @@ if ($HAVE_PARTITION)
}
}
--
connection
master_1
SET
@
original_spider_auto_increment_mode
=
@@
SESSION
.
spider_auto_increment_mode
;
SET
SESSION
spider_auto_increment_mode
=
-
1
;
if
(
$USE_REPLICATION
)
{
save_master_pos
;
...
...
@@ -256,6 +258,7 @@ if ($HAVE_PARTITION)
INSERT
INTO
t2
(
id
)
VALUES
(
1000
);
SELECT
LAST_INSERT_ID
();
SELECT
MAX
(
id
)
FROM
t2
;
SET
SESSION
spider_auto_increment_mode
=
@
original_spider_auto_increment_mode
;
if
(
$USE_REPLICATION
)
{
save_master_pos
;
...
...
storage/spider/mysql-test/spider/handler/t/spider_fixes.test
View file @
18bb95b6
...
...
@@ -1049,6 +1049,8 @@ if ($USE_CHILD_GROUP2)
}
}
--
connection
master_1
SET
@
original_spider_auto_increment_mode
=
@@
SESSION
.
spider_auto_increment_mode
;
SET
SESSION
spider_auto_increment_mode
=
-
1
;
if
(
$USE_REPLICATION
)
{
save_master_pos
;
...
...
@@ -1120,6 +1122,7 @@ SELECT MAX(id) FROM t1;
INSERT
INTO
t1
(
id
)
VALUES
(
1000
);
SELECT
LAST_INSERT_ID
();
SELECT
MAX
(
id
)
FROM
t1
;
SET
SESSION
spider_auto_increment_mode
=
@
original_spider_auto_increment_mode
;
if
(
$USE_REPLICATION
)
{
save_master_pos
;
...
...
@@ -1172,6 +1175,8 @@ let $MASTER_1_ENGINE_IS_SPIDER=
if
(
$MASTER_1_ENGINE_IS_SPIDER
)
{
--
connection
master_1
SET
@
original_spider_read_only_mode
=
@@
SESSION
.
spider_read_only_mode
;
SET
SESSION
spider_read_only_mode
=
-
1
;
--
disable_warnings
DROP
TABLE
IF
EXISTS
t1
;
--
enable_warnings
...
...
@@ -1197,6 +1202,7 @@ if ($MASTER_1_ENGINE_IS_SPIDER)
DELETE
FROM
t1
;
--
error
12518
TRUNCATE
t1
;
SET
SESSION
spider_read_only_mode
=
@
original_spider_read_only_mode
;
}
if
(
!
$MASTER_1_ENGINE_IS_SPIDER
)
{
...
...
@@ -1210,6 +1216,10 @@ if (!$MASTER_1_ENGINE_IS_SPIDER)
if
(
$MASTER_1_ENGINE_IS_SPIDER
)
{
--
connection
master_1
SET
@
original_spider_error_read_mode
=
@@
SESSION
.
spider_error_read_mode
;
SET
@
original_spider_error_write_mode
=
@@
SESSION
.
spider_error_write_mode
;
SET
SESSION
spider_error_read_mode
=
-
1
;
SET
SESSION
spider_error_write_mode
=
-
1
;
--
disable_warnings
DROP
TABLE
IF
EXISTS
t1
;
--
enable_warnings
...
...
@@ -1227,6 +1237,8 @@ if ($MASTER_1_ENGINE_IS_SPIDER)
INSERT
INTO
t1
(
id
)
VALUES
(
1
);
DELETE
FROM
t1
;
TRUNCATE
t1
;
SET
SESSION
spider_error_read_mode
=
@
original_spider_error_read_mode
;
SET
SESSION
spider_error_write_mode
=
@
original_spider_error_write_mode
;
}
if
(
!
$MASTER_1_ENGINE_IS_SPIDER
)
{
...
...
storage/spider/mysql-test/spider/handler/t/spider_fixes_part.test
View file @
18bb95b6
...
...
@@ -485,6 +485,8 @@ if ($HAVE_PARTITION)
}
}
--
connection
master_1
SET
@
original_spider_auto_increment_mode
=
@@
SESSION
.
spider_auto_increment_mode
;
SET
SESSION
spider_auto_increment_mode
=
-
1
;
if
(
$USE_REPLICATION
)
{
save_master_pos
;
...
...
@@ -556,6 +558,7 @@ if ($HAVE_PARTITION)
INSERT
INTO
t1
(
id
)
VALUES
(
1000
);
SELECT
LAST_INSERT_ID
();
SELECT
MAX
(
id
)
FROM
t1
;
SET
SESSION
spider_auto_increment_mode
=
@
original_spider_auto_increment_mode
;
if
(
$USE_REPLICATION
)
{
save_master_pos
;
...
...
storage/spider/mysql-test/spider/r/spider_fixes.result
View file @
18bb95b6
...
...
@@ -413,6 +413,10 @@ connection master_1;
read only
connection master_1;
SET @original_spider_read_only_mode = @@SESSION.spider_read_only_mode;
SET SESSION spider_read_only_mode = -1;
Warnings:
Warning 138 The option value -1 (use table value) is deprecated and will be removed in a future release
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
id int(11) NOT NULL,
...
...
@@ -441,10 +445,19 @@ DELETE FROM t1;
ERROR HY000: Table 'auto_test_local.t1' is read only
TRUNCATE t1;
ERROR HY000: Table 'auto_test_local.t1' is read only
SET SESSION spider_read_only_mode = @original_spider_read_only_mode;
2.27
error mode
connection master_1;
SET @original_spider_error_read_mode = @@SESSION.spider_error_read_mode;
SET @original_spider_error_write_mode = @@SESSION.spider_error_write_mode;
SET SESSION spider_error_read_mode = -1;
Warnings:
Warning 138 The option value -1 (use table value) is deprecated and will be removed in a future release
SET SESSION spider_error_write_mode = -1;
Warnings:
Warning 138 The option value -1 (use table value) is deprecated and will be removed in a future release
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
id int(11) NOT NULL,
...
...
@@ -466,6 +479,8 @@ Error 1146 Table 'auto_test_remote.ter1_1' doesn't exist
TRUNCATE t1;
Warnings:
Error 1146 Table 'auto_test_remote.ter1_1' doesn't exist
SET SESSION spider_error_read_mode = @original_spider_error_read_mode;
SET SESSION spider_error_write_mode = @original_spider_error_write_mode;
3.0
is null
...
...
storage/spider/mysql-test/spider/r/variable_deprecation.result
0 → 100644
View file @
18bb95b6
#
# MDEV-27228 Deprecate Spider plugin variables that result in excessive tweak
#
for master_1
for child2
child2_1
child2_2
child2_3
for child3
child3_1
child3_2
child3_3
connection master_1;
CREATE DATABASE auto_test_local;
USE auto_test_local;
# MDEV-27923 Deprecate spider_use_handler
SET spider_use_handler= 3;
Warnings:
Warning 1287 '@@spider_use_handler' is deprecated and will be removed in a future release
SHOW VARIABLES LIKE "spider_use_handler";
Variable_name Value
spider_use_handler 3
CREATE TABLE tbl_a (a INT) ENGINE=Spider COMMENT='uhd "3"';
Warnings:
Warning 1287 The table parameter 'uhd' is deprecated and will be removed in a future release
CREATE TABLE tbl_b (a INT) ENGINE=Spider COMMENT='use_handler "3"';
Warnings:
Warning 1287 The table parameter 'use_handler' is deprecated and will be removed in a future release
DROP DATABASE auto_test_local;
for master_1
for child2
child2_1
child2_2
child2_3
for child3
child3_1
child3_2
child3_3
storage/spider/mysql-test/spider/t/spider_fixes.test
View file @
18bb95b6
...
...
@@ -1172,6 +1172,8 @@ let $MASTER_1_ENGINE_IS_SPIDER=
if
(
$MASTER_1_ENGINE_IS_SPIDER
)
{
--
connection
master_1
SET
@
original_spider_read_only_mode
=
@@
SESSION
.
spider_read_only_mode
;
SET
SESSION
spider_read_only_mode
=
-
1
;
--
disable_warnings
DROP
TABLE
IF
EXISTS
t1
;
--
enable_warnings
...
...
@@ -1197,6 +1199,7 @@ if ($MASTER_1_ENGINE_IS_SPIDER)
DELETE
FROM
t1
;
--
error
12518
TRUNCATE
t1
;
SET
SESSION
spider_read_only_mode
=
@
original_spider_read_only_mode
;
}
if
(
!
$MASTER_1_ENGINE_IS_SPIDER
)
{
...
...
@@ -1210,6 +1213,10 @@ if (!$MASTER_1_ENGINE_IS_SPIDER)
if
(
$MASTER_1_ENGINE_IS_SPIDER
)
{
--
connection
master_1
SET
@
original_spider_error_read_mode
=
@@
SESSION
.
spider_error_read_mode
;
SET
@
original_spider_error_write_mode
=
@@
SESSION
.
spider_error_write_mode
;
SET
SESSION
spider_error_read_mode
=
-
1
;
SET
SESSION
spider_error_write_mode
=
-
1
;
--
disable_warnings
DROP
TABLE
IF
EXISTS
t1
;
--
enable_warnings
...
...
@@ -1227,6 +1234,8 @@ if ($MASTER_1_ENGINE_IS_SPIDER)
INSERT
INTO
t1
(
id
)
VALUES
(
1
);
DELETE
FROM
t1
;
TRUNCATE
t1
;
SET
SESSION
spider_error_read_mode
=
@
original_spider_error_read_mode
;
SET
SESSION
spider_error_write_mode
=
@
original_spider_error_write_mode
;
}
if
(
!
$MASTER_1_ENGINE_IS_SPIDER
)
{
...
...
storage/spider/mysql-test/spider/t/variable_deprecation.test
0 → 100644
View file @
18bb95b6
--
echo
#
--
echo
# MDEV-27228 Deprecate Spider plugin variables that result in excessive tweak
--
echo
#
--
disable_query_log
--
disable_result_log
--
source
test_init
.
inc
--
enable_result_log
--
enable_query_log
--
connection
master_1
CREATE
DATABASE
auto_test_local
;
USE
auto_test_local
;
--
echo
# MDEV-27923 Deprecate spider_use_handler
SET
spider_use_handler
=
3
;
SHOW
VARIABLES
LIKE
"spider_use_handler"
;
eval
CREATE
TABLE
tbl_a
(
a
INT
)
$MASTER_1_ENGINE
COMMENT
=
'uhd "3"'
;
eval
CREATE
TABLE
tbl_b
(
a
INT
)
$MASTER_1_ENGINE
COMMENT
=
'use_handler "3"'
;
DROP
DATABASE
auto_test_local
;
--
disable_query_log
--
disable_result_log
--
source
test_deinit
.
inc
--
enable_result_log
--
enable_query_log
storage/spider/spd_param.cc
View file @
18bb95b6
...
...
@@ -154,6 +154,20 @@ static MYSQL_SYSVAR_BOOL(
TRUE
);
static
void
spider_use_table_value_deprecated
(
THD
*
thd
,
st_mysql_sys_var
*
,
void
*
var_ptr
,
const
void
*
save
)
{
int
val
=
*
static_cast
<
const
int
*>
(
save
);
*
static_cast
<
int
*>
(
var_ptr
)
=
val
;
if
(
val
==
-
1
)
{
push_warning_printf
(
thd
,
Sql_condition
::
WARN_LEVEL_WARN
,
HA_ERR_UNSUPPORTED
,
"The option value -1 (use table value) is deprecated "
"and will be removed in a future release"
);
}
}
my_bool
spider_param_support_xa
()
{
DBUG_ENTER
(
"spider_param_support_xa"
);
...
...
@@ -235,8 +249,8 @@ static MYSQL_SYSVAR_INT(
PLUGIN_VAR_RQCMDARG
|
PLUGIN_VAR_READONLY
,
"Use table charset for remote access"
,
NULL
,
NULL
,
-
1
,
spider_use_table_value_deprecated
,
1
,
-
1
,
1
,
0
...
...
@@ -438,8 +452,8 @@ static MYSQL_THDVAR_LONGLONG(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"Internal offset"
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
0
,
/* def */
-
1
,
/* min */
9223372036854775807LL
,
/* max */
0
/* blk */
...
...
@@ -463,8 +477,8 @@ static MYSQL_THDVAR_LONGLONG(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"Internal limit"
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
9223372036854775807LL
,
/* def */
-
1
,
/* min */
9223372036854775807LL
,
/* max */
0
/* blk */
...
...
@@ -488,8 +502,8 @@ static MYSQL_THDVAR_LONGLONG(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"Number of rows at a select"
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
9223372036854775807LL
,
/* def */
-
1
,
/* min */
9223372036854775807LL
,
/* max */
0
/* blk */
...
...
@@ -514,8 +528,8 @@ static MYSQL_THDVAR_INT(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"Use offset and limit parameter in SQL for split_read parameter."
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
2
,
/* def */
-
1
,
/* min */
2147483647
,
/* max */
0
/* blk */
...
...
@@ -539,8 +553,8 @@ static MYSQL_THDVAR_LONGLONG(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"The limit value for semi_split_read"
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
9223372036854775807LL
,
/* def */
-
1
,
/* min */
9223372036854775807LL
,
/* max */
0
/* blk */
...
...
@@ -565,8 +579,8 @@ static MYSQL_THDVAR_INT(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"Initial sql string alloc size"
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
1024
,
/* def */
-
1
,
/* min */
2147483647
,
/* max */
0
/* blk */
...
...
@@ -591,8 +605,8 @@ static MYSQL_THDVAR_INT(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"Reset sql string alloc after execute"
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
1
,
/* def */
-
1
,
/* min */
1
,
/* max */
0
/* blk */
...
...
@@ -617,8 +631,8 @@ static MYSQL_THDVAR_INT(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"Sprit read mode for multi range"
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
100
,
/* def */
-
1
,
/* min */
2147483647
,
/* max */
0
/* blk */
...
...
@@ -642,8 +656,8 @@ static MYSQL_THDVAR_INT(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"Max columns for order by"
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
32767
,
/* def */
-
1
,
/* min */
32767
,
/* max */
0
/* blk */
...
...
@@ -798,8 +812,8 @@ static MYSQL_THDVAR_INT(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"Use different connection if semi_table_lock is enabled"
,
/* comment */
&
spider_param_semi_table_lock_connection_check
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
1
,
/* def */
-
1
,
/* min */
1
,
/* max */
0
/* blk */
...
...
@@ -847,8 +861,8 @@ static MYSQL_THDVAR_INT(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"Lock for select with update"
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
1
,
/* def */
-
1
,
/* min */
2
,
/* max */
0
/* blk */
...
...
@@ -936,8 +950,8 @@ static MYSQL_THDVAR_INT(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"Bulk insert size"
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
16000
,
/* def */
-
1
,
/* min */
2147483647
,
/* max */
0
/* blk */
...
...
@@ -965,8 +979,8 @@ static MYSQL_THDVAR_INT(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"The mode of bulk updating and deleting"
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
0
,
/* def */
-
1
,
/* min */
2
,
/* max */
0
/* blk */
...
...
@@ -990,8 +1004,8 @@ static MYSQL_THDVAR_INT(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"Bulk update size"
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
16000
,
/* def */
-
1
,
/* min */
2147483647
,
/* max */
0
/* blk */
...
...
@@ -1015,8 +1029,8 @@ static MYSQL_THDVAR_INT(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"Buffer size"
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
16000
,
/* def */
-
1
,
/* min */
2147483647
,
/* max */
0
/* blk */
...
...
@@ -1041,8 +1055,8 @@ static MYSQL_THDVAR_INT(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"Execute optimize to remote server"
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
0
,
/* def */
-
1
,
/* min */
1
,
/* max */
0
/* blk */
...
...
@@ -1067,8 +1081,8 @@ static MYSQL_THDVAR_INT(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"Execute optimize to remote server with local"
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
0
,
/* def */
-
1
,
/* min */
1
,
/* max */
0
/* blk */
...
...
@@ -1216,8 +1230,8 @@ static MYSQL_THDVAR_INT(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"Wait timeout of connecting to remote server"
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
6
,
/* def */
-
1
,
/* min */
2147483647
,
/* max */
0
/* blk */
...
...
@@ -1243,8 +1257,8 @@ static MYSQL_THDVAR_INT(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"Wait timeout of receiving data from remote server"
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
600
,
/* def */
-
1
,
/* min */
2147483647
,
/* max */
0
/* blk */
...
...
@@ -1270,8 +1284,8 @@ static MYSQL_THDVAR_INT(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"Wait timeout of sending data to remote server"
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
600
,
/* def */
-
1
,
/* min */
2147483647
,
/* max */
0
/* blk */
...
...
@@ -1301,8 +1315,8 @@ static MYSQL_THDVAR_INT(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"The retrieval result from a remote server is acquired by acquisition one by one"
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
3
,
/* def */
-
1
,
/* min */
3
,
/* max */
0
/* blk */
...
...
@@ -1326,8 +1340,8 @@ static MYSQL_THDVAR_LONGLONG(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"Number of records in a page when acquisition one by one"
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
1024
,
/* def */
-
1
,
/* min */
9223372036854775807LL
,
/* max */
0
/* blk */
...
...
@@ -1351,8 +1365,8 @@ static MYSQL_THDVAR_LONGLONG(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"The limitation of memory size in a page when acquisition one by one"
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
10485760
,
/* def */
-
1
,
/* min */
9223372036854775807LL
,
/* max */
0
/* blk */
...
...
@@ -1377,8 +1391,8 @@ static MYSQL_THDVAR_INT(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"Use low memory mode when SQL(SELECT) internally issued to a remote server is executed and get a result list"
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
1
,
/* def */
-
1
,
/* min */
1
,
/* max */
0
/* blk */
...
...
@@ -1404,8 +1418,8 @@ static MYSQL_THDVAR_INT(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"The mode of using columns at select clause"
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
1
,
/* def */
-
1
,
/* min */
1
,
/* max */
0
/* blk */
...
...
@@ -1433,8 +1447,8 @@ static MYSQL_THDVAR_INT(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"Mode of background search"
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
0
,
/* def */
-
1
,
/* min */
3
,
/* max */
0
/* blk */
...
...
@@ -1459,8 +1473,8 @@ static MYSQL_THDVAR_LONGLONG(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"Number of first read records when background search is used"
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
2
,
/* def */
-
1
,
/* min */
9223372036854775807LL
,
/* max */
0
/* blk */
...
...
@@ -1485,8 +1499,8 @@ static MYSQL_THDVAR_LONGLONG(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"Number of second read records when background search is used"
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
100
,
/* def */
-
1
,
/* min */
9223372036854775807LL
,
/* max */
0
/* blk */
...
...
@@ -1512,8 +1526,8 @@ static MYSQL_THDVAR_LONGLONG(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"Number of first read records"
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
0
,
/* def */
-
1
,
/* min */
9223372036854775807LL
,
/* max */
0
/* blk */
...
...
@@ -1538,8 +1552,8 @@ static MYSQL_THDVAR_LONGLONG(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"Number of second read records"
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
0
,
/* def */
-
1
,
/* min */
9223372036854775807LL
,
/* max */
0
/* blk */
...
...
@@ -1564,8 +1578,8 @@ static MYSQL_THDVAR_INT(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"Interval of cardinality confirmation.(second)"
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
5
1
,
/* def */
-
1
,
/* min */
2147483647
,
/* max */
0
/* blk */
...
...
@@ -1592,8 +1606,8 @@ static MYSQL_THDVAR_INT(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"Mode of cardinality confirmation."
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
1
,
/* def */
-
1
,
/* min */
3
,
/* max */
0
/* blk */
...
...
@@ -1621,8 +1635,8 @@ static MYSQL_THDVAR_INT(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"Cardinality synchronization in partitioned table."
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
0
,
/* def */
-
1
,
/* min */
2
,
/* max */
0
/* blk */
...
...
@@ -1649,8 +1663,8 @@ static MYSQL_THDVAR_INT(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"Type of cardinality calculation."
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
2
,
/* def */
-
1
,
/* min */
2
,
/* max */
0
/* blk */
...
...
@@ -1674,8 +1688,8 @@ static MYSQL_THDVAR_INT(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"Weight coefficient to calculate effectiveness of index from cardinality of column."
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
2
,
/* def */
-
1
,
/* min */
2147483647
,
/* max */
0
/* blk */
...
...
@@ -1702,8 +1716,8 @@ static MYSQL_THDVAR_INT(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"Mode of cardinality confirmation at background."
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
2
,
/* def */
-
1
,
/* min */
2
,
/* max */
0
/* blk */
...
...
@@ -1729,8 +1743,8 @@ static MYSQL_THDVAR_INT(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"Interval of table state confirmation.(second)"
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
10
,
/* def */
-
1
,
/* min */
2147483647
,
/* max */
0
/* blk */
...
...
@@ -1756,8 +1770,8 @@ static MYSQL_THDVAR_INT(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"Mode of table state confirmation."
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
1
,
/* def */
-
1
,
/* min */
2
,
/* max */
0
/* blk */
...
...
@@ -1785,8 +1799,8 @@ static MYSQL_THDVAR_INT(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"Table state synchronization in partitioned table."
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
0
,
/* def */
-
1
,
/* min */
2
,
/* max */
0
/* blk */
...
...
@@ -1814,8 +1828,8 @@ static MYSQL_THDVAR_INT(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"Mode of table state confirmation at background."
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
2
,
/* def */
-
1
,
/* min */
2
,
/* max */
0
/* blk */
...
...
@@ -1865,8 +1879,8 @@ static MYSQL_THDVAR_INT(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"Mode of auto increment."
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
0
,
/* def */
-
1
,
/* min */
3
,
/* max */
0
/* blk */
...
...
@@ -1958,8 +1972,8 @@ static MYSQL_THDVAR_INT(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"Execute
\"
REPLACE
\"
and
\"
INSERT IGNORE
\"
on remote server and avoid duplicate check on local server"
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
0
,
/* def */
-
1
,
/* min */
1
,
/* max */
0
/* blk */
...
...
@@ -2385,8 +2399,8 @@ static MYSQL_THDVAR_INT(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"Mode of BKA for Spider"
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
1
,
/* def */
-
1
,
/* min */
2
,
/* max */
0
/* blk */
...
...
@@ -2460,11 +2474,11 @@ longlong spider_param_udf_ct_bulk_insert_rows(
*/
static
MYSQL_THDVAR_INT
(
use_handler
,
/* name */
PLUGIN_VAR_RQCMDARG
,
/* opt */
PLUGIN_VAR_RQCMDARG
|
PLUGIN_VAR_DEPRECATED
,
/* opt */
"Use handler for reading"
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
0
,
/* def */
-
1
,
/* min */
3
,
/* max */
0
/* blk */
...
...
@@ -2489,8 +2503,8 @@ static MYSQL_THDVAR_INT(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"Read error mode if error"
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
0
,
/* def */
-
1
,
/* min */
1
,
/* max */
0
/* blk */
...
...
@@ -2515,8 +2529,8 @@ static MYSQL_THDVAR_INT(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"Write error mode if error"
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
0
,
/* def */
-
1
,
/* min */
1
,
/* max */
0
/* blk */
...
...
@@ -2541,8 +2555,8 @@ static MYSQL_THDVAR_INT(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"Skip generating internal default condition"
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
0
,
/* def */
-
1
,
/* min */
1
,
/* max */
0
/* blk */
...
...
@@ -2569,8 +2583,8 @@ static MYSQL_THDVAR_INT(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"Skip parallel search by specific conditions"
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
0
,
/* def */
-
1
,
/* min */
3
,
/* max */
0
/* blk */
...
...
@@ -2595,8 +2609,8 @@ static MYSQL_THDVAR_LONGLONG(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"Send 'ORDER BY' and 'LIMIT' to remote server directly"
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
9223372036854775807LL
,
/* def */
-
1
,
/* min */
9223372036854775807LL
,
/* max */
0
/* blk */
...
...
@@ -2621,8 +2635,8 @@ static MYSQL_THDVAR_INT(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"Read only"
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
0
,
/* def */
-
1
,
/* min */
1
,
/* max */
0
/* blk */
...
...
@@ -2870,8 +2884,8 @@ static MYSQL_THDVAR_INT(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"Read casually if it is possible"
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
0
,
/* def */
-
1
,
/* min */
63
,
/* max */
0
/* blk */
...
...
@@ -2913,8 +2927,8 @@ static MYSQL_THDVAR_INT(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"The type of delete_all_rows"
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
1
,
/* def */
-
1
,
/* min */
1
,
/* max */
0
/* blk */
...
...
@@ -2939,8 +2953,8 @@ static MYSQL_THDVAR_INT(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"The type of temporary table name for bka"
,
/* comment */
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
0
,
/* def */
-
1
,
/* min */
1
,
/* max */
0
/* blk */
...
...
@@ -2991,8 +3005,8 @@ static MYSQL_SYSVAR_INT(
PLUGIN_VAR_RQCMDARG
,
"Store last sts result into system table"
,
NULL
,
NULL
,
-
1
,
spider_use_table_value_deprecated
,
1
,
-
1
,
1
,
0
...
...
@@ -3018,8 +3032,8 @@ static MYSQL_SYSVAR_INT(
PLUGIN_VAR_RQCMDARG
,
"Store last crd result into system table"
,
NULL
,
NULL
,
-
1
,
spider_use_table_value_deprecated
,
1
,
-
1
,
1
,
0
...
...
@@ -3045,8 +3059,8 @@ static MYSQL_SYSVAR_INT(
PLUGIN_VAR_RQCMDARG
,
"Load sts from system table at startup"
,
NULL
,
NULL
,
-
1
,
spider_use_table_value_deprecated
,
1
,
-
1
,
1
,
0
...
...
@@ -3072,8 +3086,8 @@ static MYSQL_SYSVAR_INT(
PLUGIN_VAR_RQCMDARG
,
"Load crd from system table at startup"
,
NULL
,
NULL
,
-
1
,
spider_use_table_value_deprecated
,
1
,
-
1
,
1
,
0
...
...
@@ -3242,8 +3256,8 @@ static MYSQL_THDVAR_INT(
PLUGIN_VAR_RQCMDARG
,
/* opt */
"Use columns in select clause strictly for group by clause"
,
NULL
,
/* check */
NULL
,
/* update */
-
1
,
/* def */
spider_use_table_value_deprecated
,
/* update */
1
,
/* def */
-
1
,
/* min */
1
,
/* max */
0
/* blk */
...
...
storage/spider/spd_table.cc
View file @
18bb95b6
...
...
@@ -2009,6 +2009,16 @@ int st_spider_param_string_parse::print_param_error()
} \
break; \
}
#define SPIDER_PARAM_DEPRECATED_WARNING(title_name) \
if (!strncasecmp(tmp_ptr, title_name, title_length) && create_table) \
{ \
THD *thd= current_thd; \
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, \
ER_WARN_DEPRECATED_SYNTAX, \
"The table parameter '%s' is deprecated and will be " \
"removed in a future release", \
title_name); \
}
/*
Set a given engine-defined option, which holds a string list, to the
...
...
@@ -2409,6 +2419,7 @@ int spider_parse_connect_info(
option_struct
&&
option_struct
->
remote_table
);
SPIDER_PARAM_INT_WITH_MAX
(
"tcm"
,
table_count_mode
,
0
,
3
);
SPIDER_PARAM_DEPRECATED_WARNING
(
"uhd"
);
SPIDER_PARAM_LONG_LIST_WITH_MAX
(
"uhd"
,
use_handlers
,
0
,
3
);
SPIDER_PARAM_INT_WITH_MAX
(
"upu"
,
use_pushdown_udf
,
0
,
1
);
SPIDER_PARAM_INT_WITH_MAX
(
"utc"
,
use_table_charset
,
0
,
1
);
...
...
@@ -2492,6 +2503,7 @@ int spider_parse_connect_info(
SPIDER_PARAM_INT_WITH_MAX
(
"sts_bg_mode"
,
sts_bg_mode
,
0
,
2
);
#endif
SPIDER_PARAM_LONG_LIST_WITH_MAX
(
"link_status"
,
link_statuses
,
0
,
3
);
SPIDER_PARAM_DEPRECATED_WARNING
(
"use_handler"
);
SPIDER_PARAM_LONG_LIST_WITH_MAX
(
"use_handler"
,
use_handlers
,
0
,
3
);
SPIDER_PARAM_INT_WITH_MAX
(
"casual_read"
,
casual_read
,
0
,
63
);
SPIDER_PARAM_INT
(
"buffer_size"
,
buffer_size
,
0
);
...
...
strings/my_vsnprintf.c
View file @
18bb95b6
...
...
@@ -738,10 +738,11 @@ size_t my_vsnprintf_ex(CHARSET_INFO *cs, char *to, size_t n,
}
else
if
(
*
fmt
==
'f'
||
*
fmt
==
'g'
)
{
double
d
;
#if __has_feature(memory_sanitizer)
/* QQ: MSAN has double trouble? */
__msan_check_mem_is_initialized
(
ap
,
sizeof
(
double
));
#endif
d
ouble
d
=
va_arg
(
ap
,
double
);
d
=
va_arg
(
ap
,
double
);
#if __has_feature(memory_sanitizer)
/* QQ: MSAN has double trouble? */
__msan_unpoison
(
&
d
,
sizeof
(
double
));
#endif
...
...
tpool/aio_liburing.cc
View file @
18bb95b6
...
...
@@ -161,6 +161,8 @@ class aio_uring final : public tpool::aio
}
io_uring_cqe_seen
(
&
aio
->
uring_
,
cqe
);
if
(
iocb
->
m_ret_len
!=
iocb
->
m_len
&&
!
iocb
->
m_err
)
finish_synchronous
(
iocb
);
// If we need to resubmit the IO operation, but the ring is full,
// we will follow the same path as for any other error codes.
...
...
tpool/aio_linux.cc
View file @
18bb95b6
...
...
@@ -128,6 +128,8 @@ class aio_linux final : public aio
{
iocb
->
m_ret_len
=
event
.
res
;
iocb
->
m_err
=
0
;
if
(
iocb
->
m_ret_len
!=
iocb
->
m_len
)
finish_synchronous
(
iocb
);
}
iocb
->
m_internal_task
.
m_func
=
iocb
->
m_callback
;
iocb
->
m_internal_task
.
m_arg
=
iocb
;
...
...
tpool/aio_simulated.cc
View file @
18bb95b6
...
...
@@ -136,32 +136,7 @@ class simulated_aio : public aio
static
void
simulated_aio_callback
(
void
*
param
)
{
aiocb
*
cb
=
(
aiocb
*
)
param
;
#ifdef _WIN32
size_t
ret_len
;
#else
ssize_t
ret_len
;
#endif
int
err
=
0
;
switch
(
cb
->
m_opcode
)
{
case
aio_opcode
:
:
AIO_PREAD
:
ret_len
=
pread
(
cb
->
m_fh
,
cb
->
m_buffer
,
cb
->
m_len
,
cb
->
m_offset
);
break
;
case
aio_opcode
:
:
AIO_PWRITE
:
ret_len
=
pwrite
(
cb
->
m_fh
,
cb
->
m_buffer
,
cb
->
m_len
,
cb
->
m_offset
);
break
;
default:
abort
();
}
#ifdef _WIN32
if
(
static_cast
<
int
>
(
ret_len
)
<
0
)
err
=
GetLastError
();
#else
if
(
ret_len
<
0
)
err
=
errno
;
#endif
cb
->
m_ret_len
=
ret_len
;
cb
->
m_err
=
err
;
synchronous
(
cb
);
cb
->
m_internal_task
.
m_func
=
cb
->
m_callback
;
thread_pool
*
pool
=
(
thread_pool
*
)
cb
->
m_internal
;
pool
->
submit_task
(
&
cb
->
m_internal_task
);
...
...
tpool/tpool.h
View file @
18bb95b6
...
...
@@ -161,7 +161,7 @@ class aio
{
public:
/**
Submit asyncronous IO.
Submit async
h
ronous IO.
On completion, cb->m_callback is executed.
*/
virtual
int
submit_io
(
aiocb
*
cb
)
=
0
;
...
...
@@ -170,6 +170,10 @@ class aio
/** "Unind" file to AIO handler (used on Windows only) */
virtual
int
unbind
(
const
native_file_handle
&
fd
)
=
0
;
virtual
~
aio
(){};
protected:
static
void
synchronous
(
aiocb
*
cb
);
/** finish a partial read/write callback synchronously */
static
void
finish_synchronous
(
aiocb
*
cb
);
};
class
timer
...
...
tpool/tpool_generic.cc
View file @
18bb95b6
...
...
@@ -51,6 +51,58 @@ namespace tpool
static
const
std
::
chrono
::
milliseconds
LONG_TASK_DURATION
=
std
::
chrono
::
milliseconds
(
500
);
static
const
int
OVERSUBSCRIBE_FACTOR
=
2
;
/**
Process the cb synchronously
*/
void
aio
::
synchronous
(
aiocb
*
cb
)
{
#ifdef _WIN32
size_t
ret_len
;
#else
ssize_t
ret_len
;
#endif
int
err
=
0
;
switch
(
cb
->
m_opcode
)
{
case
aio_opcode
:
:
AIO_PREAD
:
ret_len
=
pread
(
cb
->
m_fh
,
cb
->
m_buffer
,
cb
->
m_len
,
cb
->
m_offset
);
break
;
case
aio_opcode
:
:
AIO_PWRITE
:
ret_len
=
pwrite
(
cb
->
m_fh
,
cb
->
m_buffer
,
cb
->
m_len
,
cb
->
m_offset
);
break
;
default:
abort
();
}
#ifdef _WIN32
if
(
static_cast
<
int
>
(
ret_len
)
<
0
)
err
=
GetLastError
();
#else
if
(
ret_len
<
0
)
{
err
=
errno
;
ret_len
=
0
;
}
#endif
cb
->
m_ret_len
=
ret_len
;
cb
->
m_err
=
err
;
if
(
!
err
&&
cb
->
m_ret_len
!=
cb
->
m_len
)
finish_synchronous
(
cb
);
}
/**
A partial read/write has occured, continue synchronously.
*/
void
aio
::
finish_synchronous
(
aiocb
*
cb
)
{
assert
(
cb
->
m_ret_len
!=
(
unsigned
int
)
cb
->
m_len
&&
!
cb
->
m_err
);
/* partial read/write */
cb
->
m_buffer
=
(
char
*
)
cb
->
m_buffer
+
cb
->
m_ret_len
;
cb
->
m_len
-=
(
unsigned
int
)
cb
->
m_ret_len
;
cb
->
m_offset
+=
cb
->
m_ret_len
;
synchronous
(
cb
);
}
/**
Implementation of generic threadpool.
This threadpool consists of the following components
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment