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
62c2f1c1
Commit
62c2f1c1
authored
Sep 04, 2004
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sql_print_error cleanup
parent
9153fd2a
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
53 additions
and
60 deletions
+53
-60
sql/ha_myisam.cc
sql/ha_myisam.cc
+10
-10
sql/handler.cc
sql/handler.cc
+1
-1
sql/opt_range.cc
sql/opt_range.cc
+3
-3
sql/slave.cc
sql/slave.cc
+1
-1
sql/sql_acl.cc
sql/sql_acl.cc
+25
-31
sql/sql_base.cc
sql/sql_base.cc
+4
-4
sql/sql_parse.cc
sql/sql_parse.cc
+6
-6
sql/sql_table.cc
sql/sql_table.cc
+2
-2
sql/sql_udf.cc
sql/sql_udf.cc
+1
-2
No files found.
sql/ha_myisam.cc
View file @
62c2f1c1
...
...
@@ -509,7 +509,7 @@ int ha_myisam::repair(THD* thd, HA_CHECK_OPT *check_opt)
(
uint
)
(
T_RETRY_WITHOUT_QUICK
|
T_QUICK
)))
{
param
.
testflag
&=
~
T_RETRY_WITHOUT_QUICK
;
sql_print_
error
(
"Note:
Retrying repair of: '%s' without quick"
,
sql_print_
information
(
"
Retrying repair of: '%s' without quick"
,
table
->
path
);
continue
;
}
...
...
@@ -517,7 +517,7 @@ int ha_myisam::repair(THD* thd, HA_CHECK_OPT *check_opt)
if
((
param
.
testflag
&
T_REP_BY_SORT
))
{
param
.
testflag
=
(
param
.
testflag
&
~
T_REP_BY_SORT
)
|
T_REP
;
sql_print_
error
(
"Note:
Retrying repair of: '%s' with keycache"
,
sql_print_
information
(
"
Retrying repair of: '%s' with keycache"
,
table
->
path
);
continue
;
}
...
...
@@ -527,7 +527,7 @@ int ha_myisam::repair(THD* thd, HA_CHECK_OPT *check_opt)
!
(
check_opt
->
flags
&
T_VERY_SILENT
))
{
char
llbuff
[
22
],
llbuff2
[
22
];
sql_print_
error
(
"Note:
Found %s of %s rows when repairing '%s'"
,
sql_print_
information
(
"
Found %s of %s rows when repairing '%s'"
,
llstr
(
file
->
state
->
records
,
llbuff
),
llstr
(
start_records
,
llbuff2
),
table
->
path
);
...
...
@@ -1034,7 +1034,7 @@ bool ha_myisam::check_and_repair(THD *thd)
// Don't use quick if deleted rows
if
(
!
file
->
state
->
del
&&
(
myisam_recover_options
&
HA_RECOVER_QUICK
))
check_opt
.
flags
|=
T_QUICK
;
sql_print_
error
(
"Warning:
Checking table: '%s'"
,
table
->
path
);
sql_print_
warning
(
"
Checking table: '%s'"
,
table
->
path
);
old_query
=
thd
->
query
;
old_query_length
=
thd
->
query_length
;
...
...
@@ -1045,7 +1045,7 @@ bool ha_myisam::check_and_repair(THD *thd)
if
((
marked_crashed
=
mi_is_crashed
(
file
))
||
check
(
thd
,
&
check_opt
))
{
sql_print_
error
(
"Warning:
Recovering table: '%s'"
,
table
->
path
);
sql_print_
warning
(
"
Recovering table: '%s'"
,
table
->
path
);
check_opt
.
flags
=
((
myisam_recover_options
&
HA_RECOVER_BACKUP
?
T_BACKUP_DATA
:
0
)
|
(
marked_crashed
?
0
:
T_QUICK
)
|
...
...
sql/handler.cc
View file @
62c2f1c1
...
...
@@ -558,7 +558,7 @@ int ha_commit_trans(THD *thd, THD_TRANS* trans)
query_cache
.
invalidate
(
thd
->
transaction
.
changed_tables
);
#endif
/*HAVE_QUERY_CACHE*/
if
(
error
&&
trans
==
&
thd
->
transaction
.
all
&&
mysql_bin_log
.
is_open
())
sql_print_error
(
"
Error:
Got error during commit; Binlog is not up to date!"
);
sql_print_error
(
"Got error during commit; Binlog is not up to date!"
);
thd
->
variables
.
tx_isolation
=
thd
->
session_tx_isolation
;
if
(
operation_done
)
{
...
...
sql/opt_range.cc
View file @
62c2f1c1
...
...
@@ -2193,7 +2193,7 @@ void SEL_ARG::test_use_count(SEL_ARG *root)
uint
e_count
=
0
;
if
(
this
==
root
&&
use_count
!=
1
)
{
sql_print_
error
(
"Note:
Use_count: Wrong count %lu for root"
,
use_count
);
sql_print_
information
(
"
Use_count: Wrong count %lu for root"
,
use_count
);
return
;
}
if
(
this
->
type
!=
SEL_ARG
::
KEY_RANGE
)
...
...
@@ -2206,7 +2206,7 @@ void SEL_ARG::test_use_count(SEL_ARG *root)
ulong
count
=
count_key_part_usage
(
root
,
pos
->
next_key_part
);
if
(
count
>
pos
->
next_key_part
->
use_count
)
{
sql_print_
error
(
"Note:
Use_count: Wrong count for key at %lx, %lu should be %lu"
,
sql_print_
information
(
"
Use_count: Wrong count for key at %lx, %lu should be %lu"
,
pos
,
pos
->
next_key_part
->
use_count
,
count
);
return
;
}
...
...
@@ -2214,7 +2214,7 @@ void SEL_ARG::test_use_count(SEL_ARG *root)
}
}
if
(
e_count
!=
elements
)
sql_print_
error
(
"Warning:
Wrong use count: %u (should be %u) for tree at %lx"
,
sql_print_
warning
(
"
Wrong use count: %u (should be %u) for tree at %lx"
,
e_count
,
elements
,
(
gptr
)
this
);
}
...
...
sql/slave.cc
View file @
62c2f1c1
...
...
@@ -1202,7 +1202,7 @@ slaves can't replicate a 5.0 or newer master.";
else
{
mi
->
clock_diff_with_master
=
0
;
/* The "most sensible" value */
sql_print_
error
(
"Warning:
\"
SELECT UNIX_TIMESTAMP()
\"
failed on master, \
sql_print_
warning
(
"
\"
SELECT UNIX_TIMESTAMP()
\"
failed on master, \
do not trust column Seconds_Behind_Master of SHOW SLAVE STATUS"
);
}
if
(
master_res
)
...
...
sql/sql_acl.cc
View file @
62c2f1c1
...
...
@@ -203,7 +203,7 @@ my_bool acl_init(THD *org_thd, bool dont_read_acl_tables)
host
.
sort
=
get_sort
(
2
,
host
.
host
.
hostname
,
host
.
db
);
if
(
check_no_resolve
&&
hostname_requires_resolving
(
host
.
host
.
hostname
))
{
sql_print_
error
(
"Warning:
'host' entry '%s|%s' "
sql_print_
warning
(
"
'host' entry '%s|%s' "
"ignored in --skip-name-resolve mode."
,
host
.
host
.
hostname
,
host
.
db
,
host
.
host
.
hostname
);
continue
;
...
...
@@ -271,7 +271,7 @@ my_bool acl_init(THD *org_thd, bool dont_read_acl_tables)
user
.
user
=
get_field
(
&
mem
,
table
->
field
[
1
]);
if
(
check_no_resolve
&&
hostname_requires_resolving
(
user
.
host
.
hostname
))
{
sql_print_
error
(
"Warning:
'user' entry '%s@%s' "
sql_print_
warning
(
"
'user' entry '%s@%s' "
"ignored in --skip-name-resolve mode."
,
user
.
user
,
user
.
host
.
hostname
,
user
.
host
.
hostname
);
continue
;
...
...
@@ -284,14 +284,14 @@ my_bool acl_init(THD *org_thd, bool dont_read_acl_tables)
{
switch
(
password_len
)
{
case
45
:
/* 4.1: to be removed */
sql_print_
error
(
"Found 4.1 style password for user '%s@%s'. "
sql_print_
warning
(
"Found 4.1 style password for user '%s@%s'. "
"Ignoring user. "
"You should change password for this user."
,
user
.
user
?
user
.
user
:
""
,
user
.
host
.
hostname
?
user
.
host
.
hostname
:
""
);
break
;
default:
sql_print_
error
(
"Found invalid password for user: '%s@%s'; "
sql_print_
warning
(
"Found invalid password for user: '%s@%s'; "
"Ignoring user"
,
user
.
user
?
user
.
user
:
""
,
user
.
host
.
hostname
?
user
.
host
.
hostname
:
""
);
break
;
...
...
@@ -368,13 +368,13 @@ my_bool acl_init(THD *org_thd, bool dont_read_acl_tables)
db
.
db
=
get_field
(
&
mem
,
table
->
field
[
1
]);
if
(
!
db
.
db
)
{
sql_print_
error
(
"Found an entry in the 'db' table with empty database name; Skipped"
);
sql_print_
warning
(
"Found an entry in the 'db' table with empty database name; Skipped"
);
continue
;
}
db
.
user
=
get_field
(
&
mem
,
table
->
field
[
2
]);
if
(
check_no_resolve
&&
hostname_requires_resolving
(
db
.
host
.
hostname
))
{
sql_print_
error
(
"Warning:
'db' entry '%s %s@%s' "
sql_print_
warning
(
"
'db' entry '%s %s@%s' "
"ignored in --skip-name-resolve mode."
,
db
.
db
,
db
.
user
,
db
.
host
.
hostname
,
db
.
host
.
hostname
);
continue
;
...
...
@@ -733,7 +733,7 @@ int acl_getroot(THD *thd, USER_RESOURCES *mqh,
else
{
if
(
global_system_variables
.
log_warnings
)
sql_print_
error
(
"X509 ciphers mismatch: should be '%s' but is '%s'"
,
sql_print_
information
(
"X509 ciphers mismatch: should be '%s' but is '%s'"
,
acl_user
->
ssl_cipher
,
SSL_get_cipher
(
ssl
));
break
;
...
...
@@ -757,7 +757,7 @@ int acl_getroot(THD *thd, USER_RESOURCES *mqh,
if
(
strcmp
(
acl_user
->
x509_issuer
,
ptr
))
{
if
(
global_system_variables
.
log_warnings
)
sql_print_
error
(
"X509 issuer mismatch: should be '%s' "
sql_print_
information
(
"X509 issuer mismatch: should be '%s' "
"but is '%s'"
,
acl_user
->
x509_issuer
,
ptr
);
free
(
ptr
);
break
;
...
...
@@ -775,7 +775,7 @@ int acl_getroot(THD *thd, USER_RESOURCES *mqh,
if
(
strcmp
(
acl_user
->
x509_subject
,
ptr
))
{
if
(
global_system_variables
.
log_warnings
)
sql_print_
error
(
"X509 subject mismatch: '%s' vs '%s'"
,
sql_print_
information
(
"X509 subject mismatch: '%s' vs '%s'"
,
acl_user
->
x509_subject
,
ptr
);
}
else
...
...
@@ -2610,7 +2610,7 @@ my_bool grant_init(THD *org_thd)
{
if
(
hostname_requires_resolving
(
mem_check
->
host
))
{
sql_print_error
(
"Warning:
'tables_priv' entry '%s %s@%s' "
sql_print_warning
(
"
'tables_priv' entry '%s %s@%s' "
"ignored in --skip-name-resolve mode."
,
mem_check
->
tname
,
mem_check
->
user
,
mem_check
->
host
,
mem_check
->
host
);
...
...
@@ -3680,12 +3680,6 @@ int mysql_revoke_all(THD *thd, List <LEX_USER> &list)
rw_unlock
(
&
LOCK_grant
);
close_thread_tables
(
thd
);
/* XXX this should not be necessary. The error message is already printed
by replace_xxx_table. my_error() should be use above instead of
sql_print_error(), and print ER_NONEXISTING_GRANT - as other grant
commands do */
/* when this code is deleted, the error slot (error 1268) can be reused,
as this error code was not present in any MySQL release */
if
(
result
)
my_error
(
ER_REVOKE_GRANTS
,
MYF
(
0
));
...
...
sql/sql_base.cc
View file @
62c2f1c1
...
...
@@ -1384,7 +1384,7 @@ static int open_unireg_entry(THD *thd, TABLE *entry, const char *db,
/* Give right error message */
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
);
sql_print_error
(
"Couldn't repair table: %s.%s"
,
db
,
name
);
if
(
entry
->
file
)
closefrm
(
entry
);
error
=
1
;
...
...
@@ -1424,7 +1424,7 @@ static int open_unireg_entry(THD *thd, TABLE *entry, const char *db,
DBA on top of warning the client (which will automatically be done
because of MYF(MY_WME) in my_malloc() above).
*/
sql_print_error
(
"
Error: w
hen opening HEAP table, could not allocate \
sql_print_error
(
"
W
hen opening HEAP table, could not allocate \
memory to write 'DELETE FROM `%s`.`%s`' to the binary log"
,
db
,
name
);
if
(
entry
->
file
)
closefrm
(
entry
);
...
...
@@ -1820,7 +1820,7 @@ bool rm_temporary_table(enum db_type base, char *path)
if
(
file
&&
file
->
delete_table
(
path
))
{
error
=
1
;
sql_print_
error
(
"Warning:
Could not remove tmp table: '%s', error: %d"
,
sql_print_
warning
(
"
Could not remove tmp table: '%s', error: %d"
,
path
,
my_errno
);
}
delete
file
;
...
...
sql/sql_parse.cc
View file @
62c2f1c1
...
...
@@ -1022,7 +1022,7 @@ pthread_handler_decl(handle_one_connection,arg)
if
(
net
->
error
&&
net
->
vio
!=
0
&&
net
->
report_error
)
{
if
(
!
thd
->
killed
&&
thd
->
variables
.
log_warnings
>
1
)
sql_print_error
(
ER
(
ER_NEW_ABORTING_CONNECTION
),
sql_print_warning
(
ER
(
ER_NEW_ABORTING_CONNECTION
),
thd
->
thread_id
,(
thd
->
db
?
thd
->
db
:
"unconnected"
),
thd
->
user
?
thd
->
user
:
"unauthenticated"
,
thd
->
host_or_ip
,
...
...
sql/sql_table.cc
View file @
62c2f1c1
...
...
@@ -3250,7 +3250,7 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
my_free
((
char
*
)
table
,
MYF
(
0
));
}
else
sql_print_
error
(
"Warning:
Could not open BDB table %s.%s after rename
\n
"
,
sql_print_
warning
(
"
Could not open BDB table %s.%s after rename
\n
"
,
new_db
,
table_name
);
(
void
)
berkeley_flush_logs
();
}
...
...
sql/sql_udf.cc
View file @
62c2f1c1
...
...
@@ -184,8 +184,7 @@ void udf_init()
if
(
!
(
dl
=
dlopen
(
tmp
->
dl
,
RTLD_NOW
)))
{
/* Print warning to log */
sql_print_error
(
ER
(
ER_CANT_OPEN_LIBRARY
),
tmp
->
dl
,
errno
,
dlerror
());
sql_print_error
(
ER
(
ER_CANT_OPEN_LIBRARY
),
tmp
->
dl
,
errno
,
dlerror
());
/* Keep the udf in the hash so that we can remove it later */
continue
;
}
...
...
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