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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
c94b3913
Commit
c94b3913
authored
Nov 04, 2002
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed error handling bug
parent
e65fd5d5
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
13 deletions
+16
-13
sql/log_event.cc
sql/log_event.cc
+3
-3
sql/mini_client.cc
sql/mini_client.cc
+1
-0
sql/sql_base.cc
sql/sql_base.cc
+4
-7
sql/sql_class.h
sql/sql_class.h
+6
-0
sql/sql_insert.cc
sql/sql_insert.cc
+1
-1
sql/sql_parse.cc
sql/sql_parse.cc
+1
-2
No files found.
sql/log_event.cc
View file @
c94b3913
...
...
@@ -841,9 +841,9 @@ int Query_log_event::exec_event(struct st_relay_log_info* rli)
VOID
(
pthread_mutex_lock
(
&
LOCK_thread_count
));
thd
->
query_id
=
query_id
++
;
VOID
(
pthread_mutex_unlock
(
&
LOCK_thread_count
));
thd
->
query_error
=
0
;
// clear error
thd
->
net
.
last_errno
=
0
;
thd
->
net
.
last_error
[
0
]
=
0
;
thd
->
query_error
=
0
;
// clear error
thd
->
clear_error
()
;
thd
->
slave_proxy_id
=
thread_id
;
// for temp tables
/*
...
...
sql/mini_client.cc
View file @
c94b3913
...
...
@@ -451,6 +451,7 @@ mc_simple_command(MYSQL *mysql,enum enum_server_command command,
mysql
->
net
.
last_error
[
0
]
=
0
;
mysql
->
net
.
last_errno
=
0
;
mysql
->
net
.
report_error
=
0
;
mysql
->
info
=
0
;
mysql
->
affected_rows
=
~
(
my_ulonglong
)
0
;
net_clear
(
net
);
/* Clear receive buffer */
...
...
sql/sql_base.cc
View file @
c94b3913
...
...
@@ -1464,9 +1464,8 @@ static int open_unireg_entry(THD *thd, TABLE *entry, const char *db,
}
}
pthread_mutex_unlock
(
&
LOCK_open
);
thd
->
net
.
last_error
[
0
]
=
0
;
// Clear error message
thd
->
net
.
last_errno
=
0
;
error
=
0
;
thd
->
clear_error
();
// Clear error message
error
=
0
;
if
(
openfrm
(
path
,
alias
,
(
uint
)
(
HA_OPEN_KEYFILE
|
HA_OPEN_RNDFILE
|
HA_GET_INDEX
|
HA_TRY_READ_ONLY
),
...
...
@@ -1476,8 +1475,7 @@ static int open_unireg_entry(THD *thd, TABLE *entry, const char *db,
(
entry
->
file
->
is_crashed
()
&&
entry
->
file
->
check_and_repair
(
thd
)))
{
/* Give right error message */
thd
->
net
.
last_error
[
0
]
=
0
;
thd
->
net
.
last_errno
=
0
;
thd
->
clear_error
();
my_error
(
ER_NOT_KEYFILE
,
MYF
(
0
),
name
,
my_errno
);
sql_print_error
(
"Error: Couldn't repair table: %s.%s"
,
db
,
name
);
if
(
entry
->
file
)
...
...
@@ -1486,8 +1484,7 @@ static int open_unireg_entry(THD *thd, TABLE *entry, const char *db,
}
else
{
thd
->
net
.
last_error
[
0
]
=
0
;
// Clear error message
thd
->
net
.
last_errno
=
0
;
thd
->
clear_error
();
// Clear error message
}
pthread_mutex_lock
(
&
LOCK_open
);
unlock_table_name
(
thd
,
&
table_list
);
...
...
sql/sql_class.h
View file @
c94b3913
...
...
@@ -625,6 +625,12 @@ public:
void
add_changed_table
(
const
char
*
key
,
long
key_length
);
CHANGED_TABLE_LIST
*
changed_table_dup
(
const
char
*
key
,
long
key_length
);
int
send_explain_fields
(
select_result
*
result
);
inline
void
clear_error
()
{
net
.
last_error
[
0
]
=
0
;
net
.
last_errno
=
0
;
net
.
report_error
=
0
;
}
};
/*
...
...
sql/sql_insert.cc
View file @
c94b3913
...
...
@@ -1180,7 +1180,7 @@ bool delayed_insert::handle_inserts(void)
table
->
file
->
extra
(
HA_EXTRA_IGNORE_DUP_KEY
);
using_ignore
=
1
;
}
thd
.
net
.
last_errno
=
0
;
// reset error for binlog
thd
.
clear_error
()
;
// reset error for binlog
if
(
write_record
(
table
,
&
info
))
{
info
.
error_count
++
;
// Ignore errors
...
...
sql/sql_parse.cc
View file @
c94b3913
...
...
@@ -857,8 +857,7 @@ bool do_command(THD *thd)
old_timeout
=
net
->
read_timeout
;
// Wait max for 8 hours
net
->
read_timeout
=
(
uint
)
thd
->
variables
.
net_wait_timeout
;
net
->
last_error
[
0
]
=
0
;
// Clear error message
net
->
last_errno
=
0
;
thd
->
clear_error
();
// Clear error message
net_new_transaction
(
net
);
if
((
packet_length
=
my_net_read
(
net
))
==
packet_error
)
...
...
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