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
e48e717b
Commit
e48e717b
authored
Aug 24, 2013
by
Kentoku SHIBA
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert change for 10.0.4. It's remerge later.
parent
9adb6e99
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
65 additions
and
72 deletions
+65
-72
storage/spider/ha_spider.cc
storage/spider/ha_spider.cc
+14
-14
storage/spider/spd_conn.cc
storage/spider/spd_conn.cc
+8
-8
storage/spider/spd_db_conn.cc
storage/spider/spd_db_conn.cc
+13
-13
storage/spider/spd_db_include.h
storage/spider/spd_db_include.h
+1
-1
storage/spider/spd_db_mysql.cc
storage/spider/spd_db_mysql.cc
+27
-33
storage/spider/spd_ping_table.cc
storage/spider/spd_ping_table.cc
+1
-1
storage/spider/spd_table.cc
storage/spider/spd_table.cc
+1
-2
No files found.
storage/spider/ha_spider.cc
View file @
e48e717b
...
...
@@ -7840,7 +7840,7 @@ int ha_spider::info(
thd
->
main_da
.
message
());
#else
strmov
(
spider_init_error_table
->
init_error_msg
,
thd
->
get_stmt_da
()
->
message
());
thd
->
stmt_da
->
message
());
#endif
spider_init_error_table
->
init_error_time
=
(
time_t
)
time
((
time_t
*
)
0
);
...
...
@@ -8066,7 +8066,7 @@ ha_rows ha_spider::records_in_range(
thd
->
main_da
.
message
());
#else
strmov
(
spider_init_error_table
->
init_error_msg
,
thd
->
get_stmt_da
()
->
message
());
thd
->
stmt_da
->
message
());
#endif
spider_init_error_table
->
init_error_time
=
(
time_t
)
time
((
time_t
*
)
0
);
...
...
@@ -8110,7 +8110,7 @@ ha_rows ha_spider::records_in_range(
KEY
*
key_info
=
&
table
->
key_info
[
inx
];
key_part_map
full_key_part_map
=
make_prev_keypart_map
(
key_info
->
user_defined_
key_parts
);
make_prev_keypart_map
(
key_info
->
key_parts
);
key_part_map
start_key_part_map
;
key_part_map
end_key_part_map
;
key_part_map
tgt_key_part_map
;
...
...
@@ -8308,7 +8308,7 @@ int ha_spider::check_crd()
thd
->
main_da
.
message
());
#else
strmov
(
spider_init_error_table
->
init_error_msg
,
thd
->
get_stmt_da
()
->
message
());
thd
->
stmt_da
->
message
());
#endif
spider_init_error_table
->
init_error_time
=
(
time_t
)
time
((
time_t
*
)
0
);
...
...
@@ -9726,9 +9726,9 @@ int ha_spider::create(
if
(
(
thd
->
lex
->
alter_info
.
flags
&
(
A
lter_info
::
ALTER_ADD_PARTITION
|
Alter_info
::
ALTER_DROP_PARTITION
|
A
lter_info
::
ALTER_COALESCE_PARTITION
|
Alter_info
::
ALTER_REORGANIZE_PARTITION
|
A
lter_info
::
ALTER_TABLE_REORG
|
Alter_info
::
ALTER_REBUILD_PARTITION
A
LTER_ADD_PARTITION
|
ALTER_DROP_PARTITION
|
A
LTER_COALESCE_PARTITION
|
ALTER_REORGANIZE_PARTITION
|
A
LTER_TABLE_REORG
|
ALTER_REBUILD_PARTITION
)
)
&&
memcmp
(
name
+
strlen
(
name
)
-
5
,
"#TMP#"
,
5
)
...
...
@@ -9873,9 +9873,9 @@ int ha_spider::rename_table(
if
(
(
thd
->
lex
->
alter_info
.
flags
&
(
A
lter_info
::
ALTER_ADD_PARTITION
|
Alter_info
::
ALTER_DROP_PARTITION
|
A
lter_info
::
ALTER_COALESCE_PARTITION
|
Alter_info
::
ALTER_REORGANIZE_PARTITION
|
A
lter_info
::
ALTER_TABLE_REORG
|
Alter_info
::
ALTER_REBUILD_PARTITION
A
LTER_ADD_PARTITION
|
ALTER_DROP_PARTITION
|
A
LTER_COALESCE_PARTITION
|
ALTER_REORGANIZE_PARTITION
|
A
LTER_TABLE_REORG
|
ALTER_REBUILD_PARTITION
)
)
)
...
...
@@ -10000,9 +10000,9 @@ int ha_spider::delete_table(
sql_command
==
SQLCOM_ALTER_TABLE
&&
(
thd
->
lex
->
alter_info
.
flags
&
(
A
lter_info
::
ALTER_ADD_PARTITION
|
Alter_info
::
ALTER_DROP_PARTITION
|
A
lter_info
::
ALTER_COALESCE_PARTITION
|
Alter_info
::
ALTER_REORGANIZE_PARTITION
|
A
lter_info
::
ALTER_TABLE_REORG
|
Alter_info
::
ALTER_REBUILD_PARTITION
A
LTER_ADD_PARTITION
|
ALTER_DROP_PARTITION
|
A
LTER_COALESCE_PARTITION
|
ALTER_REORGANIZE_PARTITION
|
A
LTER_TABLE_REORG
|
ALTER_REBUILD_PARTITION
)
)
)
...
...
@@ -10614,7 +10614,7 @@ void ha_spider::set_select_column_mode()
/* need primary key columns */
key_info
=
&
table_share
->
key_info
[
table_share
->
primary_key
];
key_part
=
key_info
->
key_part
;
for
(
roop_count
=
0
;
roop_count
<
(
int
)
key_info
->
user_defined_
key_parts
;
for
(
roop_count
=
0
;
roop_count
<
(
int
)
key_info
->
key_parts
;
roop_count
++
)
{
field
=
key_part
[
roop_count
].
field
;
...
...
storage/spider/spd_conn.cc
View file @
e48e717b
...
...
@@ -2255,7 +2255,7 @@ void *spider_bg_conn_action(
#if MYSQL_VERSION_ID < 50500
strmov
(
result_list
->
bgs_error_msg
,
thd
->
main_da
.
message
());
#else
strmov
(
result_list
->
bgs_error_msg
,
thd
->
get_stmt_da
()
->
message
());
strmov
(
result_list
->
bgs_error_msg
,
thd
->
stmt_da
->
message
());
#endif
}
if
(
!
dbton_handler
->
need_lock_before_set_sql_for_exec
(
sql_type
))
...
...
@@ -2309,7 +2309,7 @@ void *spider_bg_conn_action(
thd
->
main_da
.
message
());
#else
strmov
(
result_list
->
bgs_error_msg
,
thd
->
get_stmt_da
()
->
message
());
thd
->
stmt_da
->
message
());
#endif
}
else
spider_db_discard_multiple_result
(
spider
,
conn
->
link_idx
,
...
...
@@ -2332,7 +2332,7 @@ void *spider_bg_conn_action(
thd
->
main_da
.
message
());
#else
strmov
(
result_list
->
bgs_error_msg
,
thd
->
get_stmt_da
()
->
message
());
thd
->
stmt_da
->
message
());
#endif
}
else
{
spider
->
connection_ids
[
conn
->
link_idx
]
=
conn
->
connection_id
;
...
...
@@ -2350,7 +2350,7 @@ void *spider_bg_conn_action(
thd
->
main_da
.
message
());
#else
strmov
(
result_list
->
bgs_error_msg
,
thd
->
get_stmt_da
()
->
message
());
thd
->
stmt_da
->
message
());
#endif
}
}
else
{
...
...
@@ -2364,7 +2364,7 @@ void *spider_bg_conn_action(
#if MYSQL_VERSION_ID < 50500
strmov
(
result_list
->
bgs_error_msg
,
thd
->
main_da
.
message
());
#else
strmov
(
result_list
->
bgs_error_msg
,
thd
->
get_stmt_da
()
->
message
());
strmov
(
result_list
->
bgs_error_msg
,
thd
->
stmt_da
->
message
());
#endif
}
#ifdef HA_CAN_BULK_ACCESS
...
...
@@ -2387,7 +2387,7 @@ void *spider_bg_conn_action(
#if MYSQL_VERSION_ID < 50500
strmov
(
result_list
->
bgs_error_msg
,
thd
->
main_da
.
message
());
#else
strmov
(
result_list
->
bgs_error_msg
,
thd
->
get_stmt_da
()
->
message
());
strmov
(
result_list
->
bgs_error_msg
,
thd
->
stmt_da
->
message
());
#endif
conn
->
mta_conn_mutex_unlock_later
=
FALSE
;
}
...
...
@@ -2420,9 +2420,9 @@ void *spider_bg_conn_action(
strmov
((
char
*
)
bg_direct_sql
->
bg_error_msg
,
thd
->
main_da
.
message
());
#else
bg_direct_sql
->
bg_error
=
thd
->
get_stmt_da
()
->
sql_errno
();
bg_direct_sql
->
bg_error
=
thd
->
stmt_da
->
sql_errno
();
strmov
((
char
*
)
bg_direct_sql
->
bg_error_msg
,
thd
->
get_stmt_da
()
->
message
());
thd
->
stmt_da
->
message
());
#endif
pthread_mutex_unlock
(
direct_sql
->
bg_mutex
);
is_error
=
TRUE
;
...
...
storage/spider/spd_db_conn.cc
View file @
e48e717b
...
...
@@ -680,7 +680,7 @@ int spider_db_errorno(
current_thd
&&
spider_param_force_commit
(
current_thd
)
==
1
)
{
push_warning
(
current_thd
,
Sql_condition
::
WARN_LEVEL_WARN
,
push_warning
(
current_thd
,
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
error_num
,
conn
->
db_conn
->
get_error
());
if
(
!
conn
->
mta_conn_mutex_unlock_later
)
{
...
...
@@ -1387,13 +1387,13 @@ int spider_db_append_key_columns(
SPIDER_RESULT_LIST
*
result_list
=
&
spider
->
result_list
;
KEY
*
key_info
=
result_list
->
key_info
;
uint
key_name_length
,
key_count
;
key_part_map
full_key_part_map
=
make_prev_keypart_map
(
key_info
->
user_defined_
key_parts
);
key_part_map
full_key_part_map
=
make_prev_keypart_map
(
key_info
->
key_parts
);
key_part_map
start_key_part_map
;
char
tmp_buf
[
MAX_FIELD_WIDTH
];
DBUG_ENTER
(
"spider_db_append_key_columns"
);
start_key_part_map
=
start_key
->
keypart_map
&
full_key_part_map
;
DBUG_PRINT
(
"info"
,
(
"spider key_info->
user_defined_key_parts=%u"
,
key_info
->
user_defined_
key_parts
));
DBUG_PRINT
(
"info"
,
(
"spider key_info->
key_parts=%u"
,
key_info
->
key_parts
));
DBUG_PRINT
(
"info"
,
(
"spider full_key_part_map=%lu"
,
full_key_part_map
));
DBUG_PRINT
(
"info"
,
(
"spider start_key_part_map=%lu"
,
start_key_part_map
));
...
...
@@ -1533,7 +1533,7 @@ int spider_db_append_key_where_internal(
}
if
(
key_info
)
full_key_part_map
=
make_prev_keypart_map
(
key_info
->
user_defined_
key_parts
);
full_key_part_map
=
make_prev_keypart_map
(
key_info
->
key_parts
);
else
full_key_part_map
=
0
;
...
...
@@ -1549,8 +1549,8 @@ int spider_db_append_key_where_internal(
end_key_part_map
=
0
;
use_both
=
FALSE
;
}
DBUG_PRINT
(
"info"
,
(
"spider key_info->
user_defined_
key_parts=%u"
,
key_info
?
key_info
->
user_defined_
key_parts
:
0
));
DBUG_PRINT
(
"info"
,
(
"spider key_info->key_parts=%u"
,
key_info
?
key_info
->
key_parts
:
0
));
DBUG_PRINT
(
"info"
,
(
"spider full_key_part_map=%lu"
,
full_key_part_map
));
DBUG_PRINT
(
"info"
,
(
"spider start_key_part_map=%lu"
,
start_key_part_map
));
DBUG_PRINT
(
"info"
,
(
"spider end_key_part_map=%lu"
,
end_key_part_map
));
...
...
@@ -2699,7 +2699,7 @@ int spider_db_fetch_key(
for
(
key_part
=
key_info
->
key_part
,
part_num
=
0
;
part_num
<
key_info
->
user_defined_
key_parts
;
part_num
<
key_info
->
key_parts
;
key_part
++
,
part_num
++
)
{
...
...
@@ -4635,7 +4635,7 @@ int spider_db_seek_tmp_key(
for
(
key_part
=
key_info
->
key_part
,
part_num
=
0
;
part_num
<
key_info
->
user_defined_
key_parts
;
part_num
<
key_info
->
key_parts
;
key_part
++
,
part_num
++
)
{
...
...
@@ -4782,7 +4782,7 @@ void spider_db_set_cardinarity(
for
(
roop_count
=
0
;
roop_count
<
(
int
)
table
->
s
->
keys
;
roop_count
++
)
{
key_info
=
&
table
->
key_info
[
roop_count
];
for
(
roop_count2
=
0
;
roop_count2
<
(
int
)
key_info
->
user_defined_
key_parts
;
for
(
roop_count2
=
0
;
roop_count2
<
(
int
)
key_info
->
key_parts
;
roop_count2
++
)
{
key_part
=
&
key_info
->
key_part
[
roop_count2
];
...
...
@@ -5438,7 +5438,7 @@ int spider_db_update_auto_increment(
for
(
roop_count
=
first_set
?
1
:
0
;
roop_count
<
(
int
)
affected_rows
;
roop_count
++
)
push_warning_printf
(
thd
,
Sql_condition
::
WARN_LEVEL_NOTE
,
push_warning_printf
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_NOTE
,
ER_SPIDER_AUTOINC_VAL_IS_DIFFERENT_NUM
,
ER_SPIDER_AUTOINC_VAL_IS_DIFFERENT_STR
);
}
...
...
@@ -5454,7 +5454,7 @@ int spider_db_update_auto_increment(
#endif
)
{
for
(
roop_count
=
0
;
roop_count
<
(
int
)
affected_rows
;
roop_count
++
)
push_warning_printf
(
thd
,
Sql_condition
::
WARN_LEVEL_NOTE
,
push_warning_printf
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_NOTE
,
ER_SPIDER_AUTOINC_VAL_IS_DIFFERENT_NUM
,
ER_SPIDER_AUTOINC_VAL_IS_DIFFERENT_STR
);
}
...
...
@@ -7759,7 +7759,7 @@ uint spider_db_check_ft_idx(
key_info
=
&
table
->
key_info
[
roop_count
];
if
(
key_info
->
algorithm
==
HA_KEY_ALG_FULLTEXT
&&
item_count
-
1
==
key_info
->
user_defined_
key_parts
item_count
-
1
==
key_info
->
key_parts
)
{
match1
=
TRUE
;
for
(
roop_count2
=
1
;
roop_count2
<
item_count
;
roop_count2
++
)
...
...
@@ -7770,7 +7770,7 @@ uint spider_db_check_ft_idx(
DBUG_RETURN
(
MAX_KEY
);
match2
=
FALSE
;
for
(
key_part
=
key_info
->
key_part
,
part_num
=
0
;
part_num
<
key_info
->
user_defined_
key_parts
;
key_part
++
,
part_num
++
)
part_num
<
key_info
->
key_parts
;
key_part
++
,
part_num
++
)
{
if
(
key_part
->
field
==
field
)
{
...
...
storage/spider/spd_db_include.h
View file @
e48e717b
...
...
@@ -25,7 +25,7 @@
#define SPIDER_HAS_APPEND_FOR_SINGLE_QUOTE
#define SPIDER_HAS_SHOW_SIMPLE_FUNC
#endif
#if
0 &&
defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100003
#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100003
#define SPIDER_GENERATE_PARTITION_SYNTAX_HAS_CURRENT_COMMENT_START
#endif
...
...
storage/spider/spd_db_mysql.cc
View file @
e48e717b
This diff is collapsed.
Click to expand it.
storage/spider/spd_ping_table.cc
View file @
e48e717b
...
...
@@ -1159,7 +1159,7 @@ my_bool spider_ping_table_init_body(
#if MYSQL_VERSION_ID < 50500
strcpy
(
message
,
thd
->
main_da
.
message
());
#else
strcpy
(
message
,
thd
->
get_stmt_da
()
->
message
());
strcpy
(
message
,
thd
->
stmt_da
->
message
());
#endif
goto
error
;
}
...
...
storage/spider/spd_table.cc
View file @
e48e717b
...
...
@@ -21,7 +21,6 @@
#else
#include "sql_priv.h"
#include "probes_mysql.h"
#include "my_getopt.h"
#include "sql_class.h"
#include "sql_partition.h"
#include "sql_servers.h"
...
...
@@ -6986,7 +6985,7 @@ bool spider_check_pk_update(
key_info
=
&
table_share
->
key_info
[
table_share
->
primary_key
];
key_part
=
key_info
->
key_part
;
for
(
roop_count
=
0
;
roop_count
<
(
int
)
key_info
->
user_defined_
key_parts
;
roop_count
++
)
for
(
roop_count
=
0
;
roop_count
<
(
int
)
key_info
->
key_parts
;
roop_count
++
)
{
if
(
bitmap_is_set
(
table
->
write_set
,
key_part
[
roop_count
].
field
->
field_index
))
...
...
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