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
6458e115
Commit
6458e115
authored
Sep 17, 2013
by
Kentoku SHIBA
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add spider_bka_mode=2
parent
38c94765
Changes
13
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
1087 additions
and
55 deletions
+1087
-55
storage/spider/ha_spider.cc
storage/spider/ha_spider.cc
+304
-46
storage/spider/ha_spider.h
storage/spider/ha_spider.h
+18
-0
storage/spider/spd_conn.cc
storage/spider/spd_conn.cc
+1
-1
storage/spider/spd_db_handlersocket.cc
storage/spider/spd_db_handlersocket.cc
+55
-0
storage/spider/spd_db_handlersocket.h
storage/spider/spd_db_handlersocket.h
+18
-0
storage/spider/spd_db_include.h
storage/spider/spd_db_include.h
+18
-0
storage/spider/spd_db_mysql.cc
storage/spider/spd_db_mysql.cc
+302
-2
storage/spider/spd_db_mysql.h
storage/spider/spd_db_mysql.h
+32
-0
storage/spider/spd_db_oracle.cc
storage/spider/spd_db_oracle.cc
+303
-2
storage/spider/spd_db_oracle.h
storage/spider/spd_db_oracle.h
+32
-0
storage/spider/spd_include.h
storage/spider/spd_include.h
+1
-1
storage/spider/spd_param.cc
storage/spider/spd_param.cc
+1
-1
storage/spider/spd_table.cc
storage/spider/spd_table.cc
+2
-2
No files found.
storage/spider/ha_spider.cc
View file @
6458e115
This diff is collapsed.
Click to expand it.
storage/spider/ha_spider.h
View file @
6458e115
...
...
@@ -818,6 +818,10 @@ class ha_spider: public handler
const
key_range
*
start_key
);
int
reuse_tmp_table_and_sql_for_bka
();
int
append_union_table_and_sql_for_bka
(
const
key_range
*
start_key
);
int
reuse_union_table_and_sql_for_bka
();
int
append_insert_sql_part
();
int
append_update_sql_part
();
#if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET)
...
...
@@ -878,10 +882,20 @@ class ha_spider: public handler
int
append_values_terminator_sql_part
(
ulong
sql_type
);
int
append_union_table_connector_sql_part
(
ulong
sql_type
);
int
append_union_table_terminator_sql_part
(
ulong
sql_type
);
int
append_key_column_values_sql_part
(
const
key_range
*
start_key
,
ulong
sql_type
);
int
append_key_column_values_with_name_sql_part
(
const
key_range
*
start_key
,
ulong
sql_type
);
int
append_key_where_sql_part
(
const
key_range
*
start_key
,
const
key_range
*
end_key
,
...
...
@@ -983,6 +997,10 @@ class ha_spider: public handler
uint
multi_range_cnt
,
bool
with_comma
);
int
append_multi_range_cnt_with_name_sql_part
(
ulong
sql_type
,
uint
multi_range_cnt
);
int
append_delete_all_rows_sql_part
(
ulong
sql_type
);
...
...
storage/spider/spd_conn.cc
View file @
6458e115
...
...
@@ -2293,7 +2293,7 @@ void *spider_bg_conn_action(
spider_db_set_names
(
spider
,
conn
,
conn
->
link_idx
)))
{
if
(
result_list
->
tmp_table_join
&&
result_list
->
tmp_table_join
&&
spider
->
bka_mode
!=
2
&&
spider_bit_is_set
(
result_list
->
tmp_table_join_first
,
conn
->
link_idx
)
)
{
...
...
storage/spider/spd_db_handlersocket.cc
View file @
6458e115
...
...
@@ -3823,6 +3823,23 @@ int spider_handlersocket_handler::reuse_tmp_table_and_sql_for_bka()
DBUG_RETURN
(
0
);
}
int
spider_handlersocket_handler
::
append_union_table_and_sql_for_bka
(
const
key_range
*
start_key
)
{
DBUG_ENTER
(
"spider_handlersocket_handler::append_union_table_and_sql_for_bka"
);
DBUG_PRINT
(
"info"
,(
"spider this=%p"
,
this
));
DBUG_ASSERT
(
0
);
DBUG_RETURN
(
0
);
}
int
spider_handlersocket_handler
::
reuse_union_table_and_sql_for_bka
()
{
DBUG_ENTER
(
"spider_handlersocket_handler::reuse_union_table_and_sql_for_bka"
);
DBUG_PRINT
(
"info"
,(
"spider this=%p"
,
this
));
DBUG_ASSERT
(
0
);
DBUG_RETURN
(
0
);
}
int
spider_handlersocket_handler
::
append_insert_for_recovery
(
ulong
sql_type
,
int
link_idx
...
...
@@ -4131,6 +4148,24 @@ int spider_handlersocket_handler::append_values_terminator_part(
DBUG_RETURN
(
0
);
}
int
spider_handlersocket_handler
::
append_union_table_connector_part
(
ulong
sql_type
)
{
DBUG_ENTER
(
"spider_handlersocket_handler::append_union_table_connector_part"
);
DBUG_PRINT
(
"info"
,(
"spider this=%p"
,
this
));
DBUG_ASSERT
(
0
);
DBUG_RETURN
(
0
);
}
int
spider_handlersocket_handler
::
append_union_table_terminator_part
(
ulong
sql_type
)
{
DBUG_ENTER
(
"spider_handlersocket_handler::append_union_table_terminator_part"
);
DBUG_PRINT
(
"info"
,(
"spider this=%p"
,
this
));
DBUG_ASSERT
(
0
);
DBUG_RETURN
(
0
);
}
int
spider_handlersocket_handler
::
append_key_column_values_part
(
const
key_range
*
start_key
,
ulong
sql_type
...
...
@@ -4141,6 +4176,16 @@ int spider_handlersocket_handler::append_key_column_values_part(
DBUG_RETURN
(
0
);
}
int
spider_handlersocket_handler
::
append_key_column_values_with_name_part
(
const
key_range
*
start_key
,
ulong
sql_type
)
{
DBUG_ENTER
(
"spider_handlersocket_handler::append_key_column_values_with_name_part"
);
DBUG_PRINT
(
"info"
,(
"spider this=%p"
,
this
));
DBUG_ASSERT
(
0
);
DBUG_RETURN
(
0
);
}
int
spider_handlersocket_handler
::
append_key_where_part
(
const
key_range
*
start_key
,
const
key_range
*
end_key
,
...
...
@@ -4400,6 +4445,16 @@ int spider_handlersocket_handler::append_multi_range_cnt_part(
DBUG_RETURN
(
0
);
}
int
spider_handlersocket_handler
::
append_multi_range_cnt_with_name_part
(
ulong
sql_type
,
uint
multi_range_cnt
)
{
DBUG_ENTER
(
"spider_handlersocket_handler::append_multi_range_cnt_with_name_part"
);
DBUG_PRINT
(
"info"
,(
"spider this=%p"
,
this
));
DBUG_ASSERT
(
0
);
DBUG_RETURN
(
0
);
}
int
spider_handlersocket_handler
::
append_open_handler_part
(
ulong
sql_type
,
uint
handler_id
,
...
...
storage/spider/spd_db_handlersocket.h
View file @
6458e115
...
...
@@ -495,6 +495,10 @@ class spider_handlersocket_handler: public spider_db_handler
const
key_range
*
start_key
);
int
reuse_tmp_table_and_sql_for_bka
();
int
append_union_table_and_sql_for_bka
(
const
key_range
*
start_key
);
int
reuse_union_table_and_sql_for_bka
();
int
append_insert_for_recovery
(
ulong
sql_type
,
int
link_idx
...
...
@@ -577,10 +581,20 @@ class spider_handlersocket_handler: public spider_db_handler
int
append_values_terminator_part
(
ulong
sql_type
);
int
append_union_table_connector_part
(
ulong
sql_type
);
int
append_union_table_terminator_part
(
ulong
sql_type
);
int
append_key_column_values_part
(
const
key_range
*
start_key
,
ulong
sql_type
);
int
append_key_column_values_with_name_part
(
const
key_range
*
start_key
,
ulong
sql_type
);
int
append_key_where_part
(
const
key_range
*
start_key
,
const
key_range
*
end_key
,
...
...
@@ -679,6 +693,10 @@ class spider_handlersocket_handler: public spider_db_handler
uint
multi_range_cnt
,
bool
with_comma
);
int
append_multi_range_cnt_with_name_part
(
ulong
sql_type
,
uint
multi_range_cnt
);
int
append_open_handler_part
(
ulong
sql_type
,
uint
handler_id
,
...
...
storage/spider/spd_db_include.h
View file @
6458e115
...
...
@@ -998,6 +998,10 @@ class spider_db_handler
const
key_range
*
start_key
)
=
0
;
virtual
int
reuse_tmp_table_and_sql_for_bka
()
=
0
;
virtual
int
append_union_table_and_sql_for_bka
(
const
key_range
*
start_key
)
=
0
;
virtual
int
reuse_union_table_and_sql_for_bka
()
=
0
;
virtual
int
append_insert_for_recovery
(
ulong
sql_type
,
int
link_idx
...
...
@@ -1072,10 +1076,20 @@ class spider_db_handler
virtual
int
append_values_terminator_part
(
ulong
sql_type
)
=
0
;
virtual
int
append_union_table_connector_part
(
ulong
sql_type
)
=
0
;
virtual
int
append_union_table_terminator_part
(
ulong
sql_type
)
=
0
;
virtual
int
append_key_column_values_part
(
const
key_range
*
start_key
,
ulong
sql_type
)
=
0
;
virtual
int
append_key_column_values_with_name_part
(
const
key_range
*
start_key
,
ulong
sql_type
)
=
0
;
virtual
int
append_key_where_part
(
const
key_range
*
start_key
,
const
key_range
*
end_key
,
...
...
@@ -1155,6 +1169,10 @@ class spider_db_handler
uint
multi_range_cnt
,
bool
with_comma
)
=
0
;
virtual
int
append_multi_range_cnt_with_name_part
(
ulong
sql_type
,
uint
multi_range_cnt
)
=
0
;
virtual
int
append_open_handler_part
(
ulong
sql_type
,
uint
handler_id
,
...
...
storage/spider/spd_db_mysql.cc
View file @
6458e115
This diff is collapsed.
Click to expand it.
storage/spider/spd_db_mysql.h
View file @
6458e115
...
...
@@ -577,6 +577,10 @@ class spider_mysql_handler: public spider_db_handler
int
tmp_table_name_length
,
int
*
db_name_pos
);
int
append_union_table_and_sql_for_bka
(
const
key_range
*
start_key
);
int
reuse_union_table_and_sql_for_bka
();
int
append_insert_for_recovery
(
ulong
sql_type
,
int
link_idx
...
...
@@ -721,6 +725,18 @@ class spider_mysql_handler: public spider_db_handler
int
append_values_terminator
(
spider_string
*
str
);
int
append_union_table_connector_part
(
ulong
sql_type
);
int
append_union_table_connector
(
spider_string
*
str
);
int
append_union_table_terminator_part
(
ulong
sql_type
);
int
append_union_table_terminator
(
spider_string
*
str
);
int
append_key_column_values_part
(
const
key_range
*
start_key
,
ulong
sql_type
...
...
@@ -729,6 +745,14 @@ class spider_mysql_handler: public spider_db_handler
spider_string
*
str
,
const
key_range
*
start_key
);
int
append_key_column_values_with_name_part
(
const
key_range
*
start_key
,
ulong
sql_type
);
int
append_key_column_values_with_name
(
spider_string
*
str
,
const
key_range
*
start_key
);
int
append_key_where_part
(
const
key_range
*
start_key
,
const
key_range
*
end_key
,
...
...
@@ -909,6 +933,14 @@ class spider_mysql_handler: public spider_db_handler
uint
multi_range_cnt
,
bool
with_comma
);
int
append_multi_range_cnt_with_name_part
(
ulong
sql_type
,
uint
multi_range_cnt
);
int
append_multi_range_cnt_with_name
(
spider_string
*
str
,
uint
multi_range_cnt
);
int
append_open_handler_part
(
ulong
sql_type
,
uint
handler_id
,
...
...
storage/spider/spd_db_oracle.cc
View file @
6458e115
This diff is collapsed.
Click to expand it.
storage/spider/spd_db_oracle.h
View file @
6458e115
...
...
@@ -660,6 +660,10 @@ class spider_oracle_handler: public spider_db_handler
int
tmp_table_name_length
,
int
*
db_name_pos
);
int
append_union_table_and_sql_for_bka
(
const
key_range
*
start_key
);
int
reuse_union_table_and_sql_for_bka
();
int
append_insert_for_recovery
(
ulong
sql_type
,
int
link_idx
...
...
@@ -804,6 +808,18 @@ class spider_oracle_handler: public spider_db_handler
int
append_values_terminator
(
spider_string
*
str
);
int
append_union_table_connector_part
(
ulong
sql_type
);
int
append_union_table_connector
(
spider_string
*
str
);
int
append_union_table_terminator_part
(
ulong
sql_type
);
int
append_union_table_terminator
(
spider_string
*
str
);
int
append_key_column_values_part
(
const
key_range
*
start_key
,
ulong
sql_type
...
...
@@ -812,6 +828,14 @@ class spider_oracle_handler: public spider_db_handler
spider_string
*
str
,
const
key_range
*
start_key
);
int
append_key_column_values_with_name_part
(
const
key_range
*
start_key
,
ulong
sql_type
);
int
append_key_column_values_with_name
(
spider_string
*
str
,
const
key_range
*
start_key
);
int
append_key_where_part
(
const
key_range
*
start_key
,
const
key_range
*
end_key
,
...
...
@@ -992,6 +1016,14 @@ class spider_oracle_handler: public spider_db_handler
uint
multi_range_cnt
,
bool
with_comma
);
int
append_multi_range_cnt_with_name_part
(
ulong
sql_type
,
uint
multi_range_cnt
);
int
append_multi_range_cnt_with_name
(
spider_string
*
str
,
uint
multi_range_cnt
);
int
append_open_handler_part
(
ulong
sql_type
,
uint
handler_id
,
...
...
storage/spider/spd_include.h
View file @
6458e115
...
...
@@ -118,7 +118,7 @@
#define SPIDER_TMP_SHARE_LONG_COUNT 15
#define SPIDER_TMP_SHARE_LONGLONG_COUNT 3
#define SPIDER_MEM_CALC_LIST_NUM 23
3
#define SPIDER_MEM_CALC_LIST_NUM 23
5
#define SPIDER_BACKUP_DASTATUS \
bool da_status; if (thd) da_status = thd->is_error(); else da_status = FALSE;
...
...
storage/spider/spd_param.cc
View file @
6458e115
...
...
@@ -2356,7 +2356,7 @@ static MYSQL_THDVAR_INT(
NULL
,
/* update */
-
1
,
/* def */
-
1
,
/* min */
1
,
/* max */
2
,
/* max */
0
/* blk */
);
...
...
storage/spider/spd_table.cc
View file @
6458e115
...
...
@@ -1900,7 +1900,7 @@ int spider_parse_connect_info(
SPIDER_PARAM_LONGLONG
(
"bsr"
,
bgs_second_read
,
0
);
#endif
SPIDER_PARAM_STR
(
"bke"
,
bka_engine
);
SPIDER_PARAM_INT_WITH_MAX
(
"bkm"
,
bka_mode
,
0
,
1
);
SPIDER_PARAM_INT_WITH_MAX
(
"bkm"
,
bka_mode
,
0
,
2
);
SPIDER_PARAM_INT
(
"bsz"
,
bulk_size
,
0
);
SPIDER_PARAM_INT_WITH_MAX
(
"bum"
,
bulk_update_mode
,
0
,
2
);
SPIDER_PARAM_INT
(
"bus"
,
bulk_update_size
,
0
);
...
...
@@ -2056,7 +2056,7 @@ int spider_parse_connect_info(
SPIDER_PARAM_INT
(
"bgs_mode"
,
bgs_mode
,
0
);
#endif
SPIDER_PARAM_STR_LIST
(
"ssl_cert"
,
tgt_ssl_certs
);
SPIDER_PARAM_INT_WITH_MAX
(
"bka_mode"
,
bka_mode
,
0
,
1
);
SPIDER_PARAM_INT_WITH_MAX
(
"bka_mode"
,
bka_mode
,
0
,
2
);
error_num
=
ER_SPIDER_INVALID_CONNECT_INFO_NUM
;
my_printf_error
(
error_num
,
ER_SPIDER_INVALID_CONNECT_INFO_STR
,
MYF
(
0
),
tmp_ptr
);
...
...
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