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
e57c8007
Commit
e57c8007
authored
Mar 29, 2007
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Manual merge from 5.0
parent
0fdd64ba
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
23 additions
and
21 deletions
+23
-21
sql/event_db_repository.cc
sql/event_db_repository.cc
+2
-2
sql/set_var.cc
sql/set_var.cc
+1
-4
sql/sql_connect.cc
sql/sql_connect.cc
+3
-2
sql/sql_db.cc
sql/sql_db.cc
+6
-4
sql/sql_insert.cc
sql/sql_insert.cc
+3
-3
sql/sql_parse.cc
sql/sql_parse.cc
+7
-5
sql/sql_update.cc
sql/sql_update.cc
+1
-1
No files found.
sql/event_db_repository.cc
View file @
e57c8007
...
...
@@ -644,7 +644,7 @@ Event_db_repository::create_event(THD *thd, Event_parse_data *parse_data,
ok:
if
(
dbchanged
)
(
void
)
mysql_change_db
(
thd
,
old_db
.
str
,
1
);
(
void
)
mysql_change_db
(
thd
,
&
old_db
,
1
);
/*
This statement may cause a spooky valgrind warning at startup
inside init_key_cache on my system (ahristov, 2006/08/10)
...
...
@@ -654,7 +654,7 @@ Event_db_repository::create_event(THD *thd, Event_parse_data *parse_data,
err:
if
(
dbchanged
)
(
void
)
mysql_change_db
(
thd
,
old_db
.
str
,
1
);
(
void
)
mysql_change_db
(
thd
,
&
old_db
,
1
);
if
(
table
)
close_thread_tables
(
thd
);
DBUG_RETURN
(
TRUE
);
...
...
sql/set_var.cc
View file @
e57c8007
...
...
@@ -3083,9 +3083,7 @@ static bool set_option_autocommit(THD *thd, set_var *var)
if
((
org_options
&
OPTION_NOT_AUTOCOMMIT
))
{
/* We changed to auto_commit mode */
thd
->
options
&=
~
(
ulonglong
)
(
OPTION_BEGIN
|
OPTION_STATUS_NO_TRANS_UPDATE
|
OPTION_KEEP_LOG
);
thd
->
options
&=
~
(
ulonglong
)
(
OPTION_BEGIN
|
OPTION_KEEP_LOG
);
thd
->
no_trans_update
.
all
=
FALSE
;
thd
->
server_status
|=
SERVER_STATUS_AUTOCOMMIT
;
if
(
ha_commit
(
thd
))
...
...
@@ -3094,7 +3092,6 @@ static bool set_option_autocommit(THD *thd, set_var *var)
else
{
thd
->
no_trans_update
.
all
=
FALSE
;
thd
->
options
&=
~
(
ulonglong
)
(
OPTION_STATUS_NO_TRANS_UPDATE
);
thd
->
server_status
&=
~
SERVER_STATUS_AUTOCOMMIT
;
}
}
...
...
sql/sql_connect.cc
View file @
e57c8007
...
...
@@ -315,6 +315,7 @@ int check_user(THD *thd, enum enum_server_command command,
bool
check_count
)
{
DBUG_ENTER
(
"check_user"
);
LEX_STRING
db_str
=
{
(
char
*
)
db
,
db
?
strlen
(
db
)
:
0
};
#ifdef NO_EMBEDDED_ACCESS_CHECKS
thd
->
main_security_ctx
.
master_access
=
GLOBAL_ACLS
;
// Full rights
...
...
@@ -326,7 +327,7 @@ int check_user(THD *thd, enum enum_server_command command,
function returns 0
*/
thd
->
reset_db
(
NULL
,
0
);
if
(
mysql_change_db
(
thd
,
db
,
FALSE
))
if
(
mysql_change_db
(
thd
,
&
db_str
,
FALSE
))
{
/* Send the error to the client */
net_send_error
(
thd
);
...
...
@@ -472,7 +473,7 @@ int check_user(THD *thd, enum enum_server_command command,
/* Change database if necessary */
if
(
db
&&
db
[
0
])
{
if
(
mysql_change_db
(
thd
,
db
,
FALSE
))
if
(
mysql_change_db
(
thd
,
&
db_str
,
FALSE
))
{
/* Send error to the client */
net_send_error
(
thd
);
...
...
sql/sql_db.cc
View file @
e57c8007
...
...
@@ -22,6 +22,7 @@
#include "events.h"
#include <my_dir.h>
#include <m_ctype.h>
#include "log.h"
#ifdef __WIN__
#include <direct.h>
#endif
...
...
@@ -1420,7 +1421,7 @@ bool mysql_change_db(THD *thd, const LEX_STRING *new_db_name, bool force_switch)
to be sure.
*/
if
(
check_db_name
(
new_db_file_name
.
str
))
if
(
check_db_name
(
&
new_db_file_name
))
{
my_error
(
ER_WRONG_DB_NAME
,
MYF
(
0
),
new_db_file_name
.
str
);
my_free
(
new_db_file_name
.
str
,
MYF
(
0
));
...
...
@@ -1454,8 +1455,9 @@ bool mysql_change_db(THD *thd, const LEX_STRING *new_db_name, bool force_switch)
sctx
->
priv_user
,
sctx
->
priv_host
,
new_db_file_name
.
str
);
mysql_log
.
write
(
thd
,
COM_INIT_DB
,
ER
(
ER_DBACCESS_DENIED_ERROR
),
sctx
->
priv_user
,
sctx
->
priv_host
,
new_db_file_name
.
str
);
general_log_print
(
thd
,
COM_INIT_DB
,
ER
(
ER_DBACCESS_DENIED_ERROR
),
sctx
->
priv_user
,
sctx
->
priv_host
,
new_db_file_name
.
str
);
my_free
(
new_db_file_name
.
str
,
MYF
(
0
));
DBUG_RETURN
(
TRUE
);
}
...
...
@@ -1801,7 +1803,7 @@ bool mysql_rename_db(THD *thd, LEX_STRING *old_db, LEX_STRING *new_db)
/* Step9: Let's do "use newdb" if we renamed the current database */
if
(
change_to_newdb
)
error
|=
mysql_change_db
(
thd
,
new_db
->
str
,
0
);
error
|=
mysql_change_db
(
thd
,
new_db
,
0
);
exit:
pthread_mutex_lock
(
&
LOCK_lock_db
);
...
...
sql/sql_insert.cc
View file @
e57c8007
...
...
@@ -712,7 +712,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
}
}
if
(
!
transactional_table
)
thd
->
options
|=
OPTION_STATUS_NO_TRANS_UPDAT
E
;
thd
->
no_trans_update
.
all
=
TRU
E
;
}
}
if
(
transactional_table
)
...
...
@@ -1322,7 +1322,7 @@ int write_record(THD *thd, TABLE *table,COPY_INFO *info)
goto
err
;
info
->
deleted
++
;
if
(
!
table
->
file
->
has_transactions
())
thd
->
no_trans_update
=
1
;
thd
->
no_trans_update
.
stmt
=
TRUE
;
if
(
table
->
triggers
&&
table
->
triggers
->
process_triggers
(
thd
,
TRG_EVENT_DELETE
,
TRG_ACTION_AFTER
,
TRUE
))
...
...
@@ -2638,7 +2638,7 @@ select_insert::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
if
(
info
.
handle_duplicates
==
DUP_REPLACE
&&
(
!
table
->
triggers
||
!
table
->
triggers
->
has_delete_triggers
()))
table
->
file
->
extra
(
HA_EXTRA_WRITE_CAN_REPLACE
);
thd
->
no_trans_update
=
0
;
thd
->
no_trans_update
.
stmt
=
FALSE
;
thd
->
abort_on_warning
=
(
!
info
.
ignore
&&
(
thd
->
variables
.
sql_mode
&
(
MODE_STRICT_TRANS_TABLES
|
...
...
sql/sql_parse.cc
View file @
e57c8007
...
...
@@ -720,7 +720,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
&
LOCK_status
);
thd
->
convert_string
(
&
tmp
,
system_charset_info
,
packet
,
packet_length
-
1
,
thd
->
charset
());
if
(
!
mysql_change_db
(
thd
,
tmp
.
str
,
FALSE
))
if
(
!
mysql_change_db
(
thd
,
&
tmp
,
FALSE
))
{
general_log_print
(
thd
,
command
,
"%s"
,
thd
->
db
);
send_ok
(
thd
);
...
...
@@ -4208,8 +4208,8 @@ mysql_execute_command(THD *thd)
xa_state_names
[
thd
->
transaction
.
xid_state
.
xa_state
]);
break
;
}
thd
->
options
&=
~
(
OPTION_BEGIN
|
OPTION_
STATUS_NO_TRANS_UPDATE
|
OPTION_KEEP_LOG
)
;
thd
->
options
&=
~
(
OPTION_BEGIN
|
OPTION_
KEEP_LOG
);
thd
->
no_trans_update
.
all
=
FALSE
;
thd
->
server_status
&=
~
SERVER_STATUS_IN_TRANS
;
xid_cache_delete
(
&
thd
->
transaction
.
xid_state
);
thd
->
transaction
.
xid_state
.
xa_state
=
XA_NOTR
;
...
...
@@ -5023,8 +5023,10 @@ void mysql_reset_thd_for_next_command(THD *thd)
in ha_rollback_trans() about some tables couldn't be rolled back.
*/
if
(
!
(
thd
->
options
&
(
OPTION_NOT_AUTOCOMMIT
|
OPTION_BEGIN
)))
thd
->
options
&=
~
(
OPTION_STATUS_NO_TRANS_UPDATE
|
OPTION_KEEP_LOG
);
{
thd
->
options
&=
~
OPTION_KEEP_LOG
;
thd
->
no_trans_update
.
all
=
FALSE
;
}
DBUG_ASSERT
(
thd
->
security_ctx
==
&
thd
->
main_security_ctx
);
thd
->
tmp_table_used
=
0
;
if
(
!
thd
->
in_sub_stmt
)
...
...
sql/sql_update.cc
View file @
e57c8007
...
...
@@ -535,7 +535,7 @@ int mysql_update(THD *thd,
if
(
!
error
)
{
updated
++
;
thd
->
no_trans_update
=
!
transactional_table
;
thd
->
no_trans_update
.
stmt
=
!
transactional_table
;
if
(
table
->
triggers
&&
table
->
triggers
->
process_triggers
(
thd
,
TRG_EVENT_UPDATE
,
...
...
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