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
0428d086
Commit
0428d086
authored
Apr 08, 2003
by
hf@deer.mysql.r18.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SCRUM
two KILL versions code trimming with headquarter's suggestions
parent
dcdc24b5
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
39 additions
and
31 deletions
+39
-31
myisam/mi_check.c
myisam/mi_check.c
+1
-1
myisam/myisamchk.c
myisam/myisamchk.c
+2
-2
myisam/myisamdef.h
myisam/myisamdef.h
+1
-1
myisam/sort.c
myisam/sort.c
+2
-2
sql/ha_myisam.cc
sql/ha_myisam.cc
+2
-2
sql/lock.cc
sql/lock.cc
+1
-1
sql/log_event.cc
sql/log_event.cc
+1
-1
sql/records.cc
sql/records.cc
+1
-1
sql/slave.cc
sql/slave.cc
+2
-2
sql/sql_class.h
sql/sql_class.h
+8
-0
sql/sql_delete.cc
sql/sql_delete.cc
+1
-1
sql/sql_load.cc
sql/sql_load.cc
+2
-2
sql/sql_parse.cc
sql/sql_parse.cc
+2
-2
sql/sql_prepare.cc
sql/sql_prepare.cc
+1
-1
sql/sql_select.cc
sql/sql_select.cc
+10
-10
sql/sql_table.cc
sql/sql_table.cc
+1
-1
sql/sql_update.cc
sql/sql_update.cc
+1
-1
No files found.
myisam/mi_check.c
View file @
0428d086
...
...
@@ -2585,7 +2585,7 @@ static int sort_get_next_record(MI_SORT_PARAM *sort_param)
char
llbuff
[
22
],
llbuff2
[
22
];
DBUG_ENTER
(
"sort_get_next_record"
);
if
(
killed_ptr
(
param
->
thd
))
if
(
*
killed_ptr
(
param
->
thd
))
DBUG_RETURN
(
1
);
switch
(
share
->
data_file_type
)
{
...
...
myisam/myisamchk.c
View file @
0428d086
...
...
@@ -1644,9 +1644,9 @@ static int sort_record_index(MI_SORT_PARAM *sort_param,MI_INFO *info,
DBUG_RETURN
(
1
);
}
/* sort_record_index */
bool
killed_ptr
(
void
*
thd
)
int
*
killed_ptr
(
void
*
thd
)
{
return
(
bool
)
thd
;
/* always NULL */
return
(
int
*
)
thd
;
/* always NULL */
}
/* print warnings and errors */
...
...
myisam/myisamdef.h
View file @
0428d086
...
...
@@ -693,7 +693,7 @@ int mi_open_keyfile(MYISAM_SHARE *share);
void
mi_setup_functions
(
register
MYISAM_SHARE
*
share
);
/* Functions needed by mi_check */
bool
killed_ptr
(
void
*
thd
);
int
*
killed_ptr
(
void
*
thd
);
void
mi_check_print_error
_VARARGS
((
MI_CHECK
*
param
,
const
char
*
fmt
,...));
void
mi_check_print_warning
_VARARGS
((
MI_CHECK
*
param
,
const
char
*
fmt
,...));
void
mi_check_print_info
_VARARGS
((
MI_CHECK
*
param
,
const
char
*
fmt
,...));
...
...
myisam/sort.c
View file @
0428d086
...
...
@@ -844,7 +844,7 @@ merge_buffers(MI_SORT_PARAM *info, uint keys, IO_CACHE *from_file,
uchar
*
strpos
;
BUFFPEK
*
buffpek
,
**
refpek
;
QUEUE
queue
;
void
*
thd
=
info
->
sort_info
->
param
->
thd
;
int
*
killed
=
killed_ptr
(
info
->
sort_info
->
param
->
thd
)
;
DBUG_ENTER
(
"merge_buffers"
);
...
...
@@ -876,7 +876,7 @@ merge_buffers(MI_SORT_PARAM *info, uint keys, IO_CACHE *from_file,
{
for
(;;)
{
if
(
killed_ptr
(
thd
)
)
if
(
*
killed
)
{
error
=
1
;
goto
err
;
}
...
...
sql/ha_myisam.cc
View file @
0428d086
...
...
@@ -89,9 +89,9 @@ static void mi_check_print_msg(MI_CHECK *param, const char* msg_type,
extern
"C"
{
bool
killed_ptr
(
void
*
thd
)
int
*
killed_ptr
(
void
*
thd
)
{
return
((
THD
*
)
thd
)
->
killed
;
return
(
int
*
)
&
(
(
THD
*
)
thd
)
->
killed
;
}
void
mi_check_print_error
(
MI_CHECK
*
param
,
const
char
*
fmt
,...)
...
...
sql/lock.cc
View file @
0428d086
...
...
@@ -154,7 +154,7 @@ MYSQL_LOCK *mysql_lock_tables(THD *thd,TABLE **tables,uint count)
thd
->
proc_info
=
0
;
if
(
thd
->
killed
)
{
my_error
(
thd
->
killed
,
MYF
(
0
)
);
thd
->
send_kill_message
(
);
if
(
sql_lock
)
{
mysql_unlock_tables
(
thd
,
sql_lock
);
...
...
sql/log_event.cc
View file @
0428d086
...
...
@@ -779,7 +779,7 @@ Query_log_event::Query_log_event(THD* thd_arg, const char* query_arg,
0
:
LOG_EVENT_THREAD_SPECIFIC_F
,
using_trans
),
data_buf
(
0
),
query
(
query_arg
),
db
(
thd_arg
->
db
),
q_len
((
uint32
)
query_length
),
error_code
(
(
int
)
thd_arg
->
killed
?
(
int
)
thd_arg
->
killed
:
thd_arg
->
net
.
last_errno
),
error_code
(
thd_arg
->
killed
!=
THD
::
NOT_KILLED
?
thd
->
killed_errno
()
:
thd_arg
->
net
.
last_errno
),
thread_id
(
thd_arg
->
thread_id
)
{
time_t
end_time
;
...
...
sql/records.cc
View file @
0428d086
...
...
@@ -154,7 +154,7 @@ static int rr_sequential(READ_RECORD *info)
{
if
(
info
->
thd
->
killed
)
{
my_error
(
info
->
thd
->
killed
,
MYF
(
0
)
);
info
->
thd
->
send_kill_message
(
);
return
1
;
}
if
(
tmp
!=
HA_ERR_RECORD_DELETED
)
...
...
sql/slave.cc
View file @
0428d086
...
...
@@ -559,7 +559,7 @@ int start_slave_thread(pthread_handler h_func, pthread_mutex_t *start_lock,
if
(
thd
->
killed
)
{
pthread_mutex_unlock
(
cond_lock
);
DBUG_RETURN
(
thd
->
killed
);
DBUG_RETURN
(
thd
->
killed
_errno
()
);
}
}
}
...
...
@@ -1861,7 +1861,7 @@ int st_relay_log_info::wait_for_pos(THD* thd, String* log_name,
pthread_mutex_unlock
(
&
data_lock
);
DBUG_PRINT
(
"exit"
,(
"killed: %d abort: %d slave_running: %d \
improper_arguments: %d timed_out: %d"
,
(
int
)
thd
->
killed
,
thd
->
killed_errno
()
,
(
int
)
(
init_abort_pos_wait
!=
abort_pos_wait
),
(
int
)
mi
->
slave_running
,
(
int
)
(
error
==
-
2
),
...
...
sql/sql_class.h
View file @
0428d086
...
...
@@ -527,6 +527,14 @@ class THD :public ilink
enum
killed_state
{
NOT_KILLED
=
0
,
KILL_CONNECTION
=
ER_SERVER_SHUTDOWN
,
KILL_QUERY
=
ER_QUERY_INTERRUPTED
};
killed_state
volatile
killed
;
inline
int
killed_errno
()
const
{
return
killed
;
}
inline
void
send_kill_message
()
const
{
my_error
(
killed_errno
(),
MYF
(
0
));
}
bool
prepare_command
;
bool
tmp_table_used
;
...
...
sql/sql_delete.cc
View file @
0428d086
...
...
@@ -212,7 +212,7 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order,
delete
select
;
free_underlaid_joins
(
thd
,
&
thd
->
lex
.
select_lex
);
if
(
error
>=
0
||
thd
->
net
.
report_error
)
send_error
(
thd
,
thd
->
killed
);
send_error
(
thd
,
thd
->
killed
_errno
()
);
else
{
send_ok
(
thd
,
deleted
);
...
...
sql/sql_load.cc
View file @
0428d086
...
...
@@ -379,7 +379,7 @@ read_fixed_length(THD *thd,COPY_INFO &info,TABLE *table,List<Item> &fields,
{
if
(
thd
->
killed
)
{
my_error
(
thd
->
killed
,
MYF
(
0
)
);
thd
->
send_kill_message
(
);
DBUG_RETURN
(
1
);
}
it
.
rewind
();
...
...
@@ -453,7 +453,7 @@ read_sep_field(THD *thd,COPY_INFO &info,TABLE *table,
{
if
(
thd
->
killed
)
{
my_error
(
thd
->
killed
,
MYF
(
0
)
);
thd
->
send_kill_message
(
);
DBUG_RETURN
(
1
);
}
while
((
sql_field
=
(
Item_field
*
)
it
++
))
...
...
sql/sql_parse.cc
View file @
0428d086
...
...
@@ -1658,7 +1658,7 @@ mysql_execute_command(THD *thd)
cursor
)))
{
if
(
res
<
0
||
thd
->
net
.
report_error
)
send_error
(
thd
,
thd
->
killed
);
send_error
(
thd
,
thd
->
killed
_errno
()
);
DBUG_RETURN
(
res
);
}
}
...
...
@@ -3141,7 +3141,7 @@ mysql_execute_command(THD *thd)
// We end up here if res == 0 and send_ok() has been done,
// or res != 0 and no send_error() has yet been done.
if
(
res
<
0
)
send_error
(
thd
,
thd
->
killed
);
send_error
(
thd
,
thd
->
killed
_errno
()
);
DBUG_RETURN
(
res
);
error:
...
...
sql/sql_prepare.cc
View file @
0428d086
...
...
@@ -674,7 +674,7 @@ static bool send_prepare_results(PREP_STMT *stmt)
DBUG_RETURN
(
0
);
abort:
send_error
(
thd
,
thd
->
killed
);
send_error
(
thd
,
thd
->
killed
_errno
()
);
DBUG_RETURN
(
1
);
}
...
...
sql/sql_select.cc
View file @
0428d086
...
...
@@ -1725,7 +1725,7 @@ make_join_statistics(JOIN *join,TABLE_LIST *tables,COND *conds,
sizeof
(
POSITION
)
*
join
->
const_tables
);
join
->
best_read
=
1.0
;
}
DBUG_RETURN
(
join
->
thd
->
killed
||
get_best_combination
(
join
));
DBUG_RETURN
(
join
->
thd
->
killed
_errno
()
||
get_best_combination
(
join
));
}
...
...
@@ -4978,7 +4978,7 @@ sub_select_cache(JOIN *join,JOIN_TAB *join_tab,bool end_of_records)
}
if
(
join
->
thd
->
killed
)
// If aborted by user
{
my_error
(
join
->
thd
->
killed
,
MYF
(
0
));
/* purecov: inspected */
join
->
thd
->
send_kill_message
();
return
-
2
;
/* purecov: inspected */
}
if
(
join_tab
->
use_quick
!=
2
||
test_if_quick_select
(
join_tab
)
<=
0
)
...
...
@@ -5017,7 +5017,7 @@ sub_select(JOIN *join,JOIN_TAB *join_tab,bool end_of_records)
{
if
(
join
->
thd
->
killed
)
// Aborted by user
{
my_error
(
join
->
thd
->
killed
,
MYF
(
0
));
/* purecov: inspected */
join
->
thd
->
send_kill_message
();
return
-
2
;
/* purecov: inspected */
}
join
->
examined_rows
++
;
...
...
@@ -5097,7 +5097,7 @@ flush_cached_records(JOIN *join,JOIN_TAB *join_tab,bool skipp_last)
{
if
(
join
->
thd
->
killed
)
{
my_error
(
join
->
thd
->
killed
,
MYF
(
0
));
/* purecov: inspected */
join
->
thd
->
send_kill_message
();
return
-
2
;
// Aborted by user /* purecov: inspected */
}
SQL_SELECT
*
select
=
join_tab
->
select
;
...
...
@@ -5745,7 +5745,7 @@ end_write(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)),
if
(
join
->
thd
->
killed
)
// Aborted by user
{
my_error
(
join
->
thd
->
killed
,
MYF
(
0
));
/* purecov: inspected */
join
->
thd
->
send_kill_message
();
DBUG_RETURN
(
-
2
);
/* purecov: inspected */
}
if
(
!
end_of_records
)
...
...
@@ -5813,7 +5813,7 @@ end_update(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)),
DBUG_RETURN
(
0
);
if
(
join
->
thd
->
killed
)
// Aborted by user
{
my_error
(
join
->
thd
->
killed
,
MYF
(
0
));
/* purecov: inspected */
join
->
thd
->
send_kill_message
();
DBUG_RETURN
(
-
2
);
/* purecov: inspected */
}
...
...
@@ -5883,7 +5883,7 @@ end_unique_update(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)),
DBUG_RETURN
(
0
);
if
(
join
->
thd
->
killed
)
// Aborted by user
{
my_error
(
join
->
thd
->
killed
,
MYF
(
0
));
/* purecov: inspected */
join
->
thd
->
send_kill_message
();
DBUG_RETURN
(
-
2
);
/* purecov: inspected */
}
...
...
@@ -5930,7 +5930,7 @@ end_write_group(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)),
if
(
join
->
thd
->
killed
)
{
// Aborted by user
my_error
(
join
->
thd
->
killed
,
MYF
(
0
));
/* purecov: inspected */
join
->
thd
->
send_kill_message
();
DBUG_RETURN
(
-
2
);
/* purecov: inspected */
}
if
(
!
join
->
first_record
||
end_of_records
||
...
...
@@ -6652,7 +6652,7 @@ static int remove_dup_with_compare(THD *thd, TABLE *table, Field **first_field,
{
if
(
thd
->
killed
)
{
my_error
(
thd
->
killed
,
MYF
(
0
)
);
thd
->
send_kill_message
(
);
error
=
0
;
goto
err
;
}
...
...
@@ -6764,7 +6764,7 @@ static int remove_dup_with_hash_index(THD *thd, TABLE *table,
{
if
(
thd
->
killed
)
{
my_error
(
thd
->
killed
,
MYF
(
0
)
);
thd
->
send_kill_message
(
);
error
=
0
;
goto
err
;
}
...
...
sql/sql_table.cc
View file @
0428d086
...
...
@@ -2381,7 +2381,7 @@ copy_data_between_tables(TABLE *from,TABLE *to,
{
if
(
thd
->
killed
)
{
my_error
(
thd
->
killed
,
MYF
(
0
)
);
thd
->
send_kill_message
(
);
error
=
1
;
break
;
}
...
...
sql/sql_update.cc
View file @
0428d086
...
...
@@ -357,7 +357,7 @@ int mysql_update(THD *thd,
delete
select
;
free_underlaid_joins
(
thd
,
&
thd
->
lex
.
select_lex
);
if
(
error
>=
0
)
send_error
(
thd
,
thd
->
killed
);
/* purecov: inspected */
send_error
(
thd
,
thd
->
killed
_errno
()
);
/* purecov: inspected */
else
{
char
buff
[
80
];
...
...
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