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
7ffe639d
Commit
7ffe639d
authored
Dec 05, 2002
by
venu@myvenu.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge work.mysql.com:/home/bk/mysql-4.1
into myvenu.com:/home/venu/bk/src-4.1
parents
dac10a8c
91558620
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
5 deletions
+38
-5
sql/mysql_priv.h
sql/mysql_priv.h
+2
-1
sql/sql_db.cc
sql/sql_db.cc
+6
-2
sql/sql_error.cc
sql/sql_error.cc
+26
-0
sql/sql_table.cc
sql/sql_table.cc
+4
-2
No files found.
sql/mysql_priv.h
View file @
7ffe639d
...
...
@@ -323,7 +323,6 @@ void free_items(Item *item);
bool
alloc_query
(
THD
*
thd
,
char
*
packet
,
ulong
packet_length
);
void
mysql_init_select
(
LEX
*
lex
);
void
mysql_init_query
(
THD
*
thd
);
void
mysql_reset_errors
(
THD
*
thd
);
bool
mysql_new_select
(
LEX
*
lex
,
bool
move_down
);
void
create_select_for_variable
(
const
char
*
var_name
);
void
mysql_init_multi_delete
(
LEX
*
lex
);
...
...
@@ -528,6 +527,8 @@ int check_insert_fields(THD *thd,TABLE *table,List<Item> &fields,
/* sql_error.cc */
void
push_warning
(
THD
*
thd
,
MYSQL_ERROR
::
enum_warning_level
level
,
uint
code
,
const
char
*
msg
);
void
store_warning
(
THD
*
thd
,
uint
errcode
,
...);
void
mysql_reset_errors
(
THD
*
thd
);
my_bool
mysqld_show_warnings
(
THD
*
thd
,
ulong
levels_to_show
);
/* sql_handler.cc */
...
...
sql/sql_db.cc
View file @
7ffe639d
...
...
@@ -331,8 +331,12 @@ int mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent)
error
=
-
1
;
my_error
(
ER_DB_DROP_EXISTS
,
MYF
(
0
),
db
);
}
else
if
(
!
silent
)
else
{
store_warning
(
thd
,
ER_DB_DROP_EXISTS
,
db
);
if
(
!
silent
)
send_ok
(
thd
,
0
);
}
goto
exit
;
}
pthread_mutex_lock
(
&
LOCK_open
);
...
...
sql/sql_error.cc
View file @
7ffe639d
...
...
@@ -104,6 +104,32 @@ void push_warning(THD *thd, MYSQL_ERROR::enum_warning_level level, uint code,
thd
->
total_warn_count
++
;
}
/*
Store warning to the list
*/
void
store_warning
(
THD
*
thd
,
uint
errcode
,
...)
{
va_list
args
;
const
char
*
format
;
char
warning
[
ERRMSGSIZE
+
20
];
DBUG_ENTER
(
"store_warning"
);
DBUG_PRINT
(
"enter"
,(
"warning: %u"
,
errcode
));
va_start
(
args
,
errcode
);
if
(
errcode
)
format
=
ER
(
errcode
);
else
{
format
=
va_arg
(
args
,
char
*
);
errcode
=
ER_UNKNOWN_ERROR
;
}
(
void
)
vsprintf
(
warning
,
format
,
args
);
va_end
(
args
);
push_warning
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
errcode
,
warning
);
DBUG_VOID_RETURN
;
}
/*
Send all notes, errors or warnings to the client in a result set
...
...
sql/sql_table.cc
View file @
7ffe639d
...
...
@@ -163,8 +163,10 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
if
(
access
(
path
,
F_OK
))
{
if
(
!
if_exists
)
error
=
1
;
if
(
if_exists
)
store_warning
(
thd
,
ER_BAD_TABLE_ERROR
,
table
->
real_name
);
else
error
=
1
;
}
else
{
...
...
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