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
d310ce76
Commit
d310ce76
authored
Jun 21, 2001
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
merge
sql/slave.cc: Auto merged sql/sql_db.cc: Auto merged
parents
63bd9b50
a7fa56c1
Changes
25
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
109 additions
and
44 deletions
+109
-44
mysql-test/r/flush.result
mysql-test/r/flush.result
+2
-0
mysql-test/t/flush.test
mysql-test/t/flush.test
+15
-0
sql/log.cc
sql/log.cc
+2
-0
sql/share/czech/errmsg.txt
sql/share/czech/errmsg.txt
+2
-2
sql/share/danish/errmsg.txt
sql/share/danish/errmsg.txt
+2
-2
sql/share/dutch/errmsg.txt
sql/share/dutch/errmsg.txt
+2
-2
sql/share/estonian/errmsg.txt
sql/share/estonian/errmsg.txt
+2
-2
sql/share/french/errmsg.txt
sql/share/french/errmsg.txt
+2
-2
sql/share/german/errmsg.txt
sql/share/german/errmsg.txt
+2
-2
sql/share/greek/errmsg.txt
sql/share/greek/errmsg.txt
+2
-2
sql/share/hungarian/errmsg.txt
sql/share/hungarian/errmsg.txt
+2
-2
sql/share/italian/errmsg.txt
sql/share/italian/errmsg.txt
+2
-2
sql/share/japanese/errmsg.txt
sql/share/japanese/errmsg.txt
+2
-2
sql/share/korean/errmsg.txt
sql/share/korean/errmsg.txt
+2
-2
sql/share/norwegian-ny/errmsg.txt
sql/share/norwegian-ny/errmsg.txt
+2
-2
sql/share/norwegian/errmsg.txt
sql/share/norwegian/errmsg.txt
+2
-2
sql/share/polish/errmsg.txt
sql/share/polish/errmsg.txt
+2
-2
sql/share/portuguese/errmsg.txt
sql/share/portuguese/errmsg.txt
+2
-2
sql/share/romanian/errmsg.txt
sql/share/romanian/errmsg.txt
+2
-2
sql/share/russian/errmsg.txt
sql/share/russian/errmsg.txt
+2
-2
sql/share/slovak/errmsg.txt
sql/share/slovak/errmsg.txt
+2
-2
sql/share/spanish/errmsg.txt
sql/share/spanish/errmsg.txt
+2
-2
sql/share/swedish/errmsg.txt
sql/share/swedish/errmsg.txt
+5
-5
sql/slave.cc
sql/slave.cc
+1
-1
sql/sql_db.cc
sql/sql_db.cc
+46
-0
No files found.
mysql-test/r/flush.result
View file @
d310ce76
n
3
n
23
n
345
mysql-test/t/flush.test
View file @
d310ce76
...
...
@@ -33,6 +33,21 @@ unlock tables;
connection
con1
;
reap
;
#test if drop database will wait until we release the global read lock
connection
con1
;
drop
database
if
exists
foo
;
create
database
foo
;
create
table
foo
.
t1
(
n
int
);
insert
into
foo
.
t1
values
(
23
);
flush
tables
with
read
lock
;
connection
con2
;
send
drop
database
foo
;
connection
con1
;
select
*
from
foo
.
t1
;
unlock
tables
;
connection
con2
;
reap
;
# test if dirty close releases global read lock
connection
con1
;
create
table
t1
(
n
int
);
...
...
sql/log.cc
View file @
d310ce76
...
...
@@ -688,6 +688,8 @@ bool MYSQL_LOG::write(Query_log_event* event_info)
{
Intvar_log_event
e
((
uchar
)
LAST_INSERT_ID_EVENT
,
thd
->
last_insert_id
);
e
.
set_log_seq
(
thd
,
this
);
if
(
thd
->
server_id
)
e
.
server_id
=
thd
->
server_id
;
if
(
e
.
write
(
file
))
goto
err
;
}
...
...
sql/share/czech/errmsg.txt
View file @
d310ce76
...
...
@@ -218,5 +218,5 @@
"Lock wait timeout exceeded",
"The total number of locks exceeds the lock table size",
"Update locks cannot be acquired during a READ UNCOMMITTED transaction",
"
Error connecting to master: %-.128s
",
"
Error running query on master: %-.128s
",
"
DROP DATABASE not allowed while thread is holding global read lock
",
"
CREATE DATABASE not allowed while thread is holding global read lock
",
sql/share/danish/errmsg.txt
View file @
d310ce76
...
...
@@ -212,5 +212,5 @@
"Lock wait timeout exceeded",
"The total number of locks exceeds the lock table size",
"Update locks cannot be acquired during a READ UNCOMMITTED transaction",
"
Error connecting to master: %-.128s
",
"
Error running query on master: %-.128s
",
"
DROP DATABASE not allowed while thread is holding global read lock
",
"
CREATE DATABASE not allowed while thread is holding global read lock
",
sql/share/dutch/errmsg.txt
View file @
d310ce76
...
...
@@ -209,5 +209,5 @@
"Lock wait timeout exceeded",
"The total number of locks exceeds the lock table size",
"Update locks cannot be acquired during a READ UNCOMMITTED transaction",
"
Error connecting to master: %-.128s
",
"
Error running query on master: %-.128s
",
"
DROP DATABASE not allowed while thread is holding global read lock
",
"
CREATE DATABASE not allowed while thread is holding global read lock
",
sql/share/estonian/errmsg.txt
View file @
d310ce76
...
...
@@ -213,5 +213,5 @@
"Lock wait timeout exceeded",
"The total number of locks exceeds the lock table size",
"Update locks cannot be acquired during a READ UNCOMMITTED transaction",
"
Error connecting to master: %-.128s
",
"
Error running query on master: %-.128s
",
"
DROP DATABASE not allowed while thread is holding global read lock
",
"
CREATE DATABASE not allowed while thread is holding global read lock
",
sql/share/french/errmsg.txt
View file @
d310ce76
...
...
@@ -209,5 +209,5 @@
"Lock wait timeout exceeded",
"The total number of locks exceeds the lock table size",
"Update locks cannot be acquired during a READ UNCOMMITTED transaction",
"
Error connecting to master: %-.128s
",
"
Error running query on master: %-.128s
",
"
DROP DATABASE not allowed while thread is holding global read lock
",
"
CREATE DATABASE not allowed while thread is holding global read lock
",
sql/share/german/errmsg.txt
View file @
d310ce76
...
...
@@ -212,5 +212,5 @@
"Lock wait timeout exceeded",
"The total number of locks exceeds the lock table size",
"Update locks cannot be acquired during a READ UNCOMMITTED transaction",
"
Error connecting to master: %-.128s
",
"
Error running query on master: %-.128s
",
"
DROP DATABASE not allowed while thread is holding global read lock
",
"
CREATE DATABASE not allowed while thread is holding global read lock
",
sql/share/greek/errmsg.txt
View file @
d310ce76
...
...
@@ -209,5 +209,5 @@
"Lock wait timeout exceeded",
"The total number of locks exceeds the lock table size",
"Update locks cannot be acquired during a READ UNCOMMITTED transaction",
"
Error connecting to master: %-.128s
",
"
Error running query on master: %-.128s
",
"
DROP DATABASE not allowed while thread is holding global read lock
",
"
CREATE DATABASE not allowed while thread is holding global read lock
",
sql/share/hungarian/errmsg.txt
View file @
d310ce76
...
...
@@ -211,5 +211,5 @@
"Lock wait timeout exceeded",
"The total number of locks exceeds the lock table size",
"Update locks cannot be acquired during a READ UNCOMMITTED transaction",
"
Error connecting to master: %-.128s
",
"
Error running query on master: %-.128s
",
"
DROP DATABASE not allowed while thread is holding global read lock
",
"
CREATE DATABASE not allowed while thread is holding global read lock
",
sql/share/italian/errmsg.txt
View file @
d310ce76
...
...
@@ -209,5 +209,5 @@
"Lock wait timeout exceeded",
"The total number of locks exceeds the lock table size",
"Update locks cannot be acquired during a READ UNCOMMITTED transaction",
"
Error connecting to master: %-.128s
",
"
Error running query on master: %-.128s
",
"
DROP DATABASE not allowed while thread is holding global read lock
",
"
CREATE DATABASE not allowed while thread is holding global read lock
",
sql/share/japanese/errmsg.txt
View file @
d310ce76
...
...
@@ -211,5 +211,5 @@
"Lock wait timeout exceeded",
"The total number of locks exceeds the lock table size",
"Update locks cannot be acquired during a READ UNCOMMITTED transaction",
"
Error connecting to master: %-.128s
",
"
Error running query on master: %-.128s
",
"
DROP DATABASE not allowed while thread is holding global read lock
",
"
CREATE DATABASE not allowed while thread is holding global read lock
",
sql/share/korean/errmsg.txt
View file @
d310ce76
...
...
@@ -209,5 +209,5 @@
"Lock wait timeout exceeded",
"The total number of locks exceeds the lock table size",
"Update locks cannot be acquired during a READ UNCOMMITTED transaction",
"
Error connecting to master: %-.128s
",
"
Error running query on master: %-.128s
",
"
DROP DATABASE not allowed while thread is holding global read lock
",
"
CREATE DATABASE not allowed while thread is holding global read lock
",
sql/share/norwegian-ny/errmsg.txt
View file @
d310ce76
...
...
@@ -211,5 +211,5 @@
"Lock wait timeout exceeded",
"The total number of locks exceeds the lock table size",
"Update locks cannot be acquired during a READ UNCOMMITTED transaction",
"
Error connecting to master: %-.128s
",
"
Error running query on master: %-.128s
",
"
DROP DATABASE not allowed while thread is holding global read lock
",
"
CREATE DATABASE not allowed while thread is holding global read lock
",
sql/share/norwegian/errmsg.txt
View file @
d310ce76
...
...
@@ -211,5 +211,5 @@
"Lock wait timeout exceeded",
"The total number of locks exceeds the lock table size",
"Update locks cannot be acquired during a READ UNCOMMITTED transaction",
"
Error connecting to master: %-.128s
",
"
Error running query on master: %-.128s
",
"
DROP DATABASE not allowed while thread is holding global read lock
",
"
CREATE DATABASE not allowed while thread is holding global read lock
",
sql/share/polish/errmsg.txt
View file @
d310ce76
...
...
@@ -213,5 +213,5 @@
"Lock wait timeout exceeded",
"The total number of locks exceeds the lock table size",
"Update locks cannot be acquired during a READ UNCOMMITTED transaction",
"
Error connecting to master: %-.128s
",
"
Error running query on master: %-.128s
",
"
DROP DATABASE not allowed while thread is holding global read lock
",
"
CREATE DATABASE not allowed while thread is holding global read lock
",
sql/share/portuguese/errmsg.txt
View file @
d310ce76
...
...
@@ -209,5 +209,5 @@
"Lock wait timeout exceeded",
"The total number of locks exceeds the lock table size",
"Update locks cannot be acquired during a READ UNCOMMITTED transaction",
"
Error connecting to master: %-.128s
",
"
Error running query on master: %-.128s
",
"
DROP DATABASE not allowed while thread is holding global read lock
",
"
CREATE DATABASE not allowed while thread is holding global read lock
",
sql/share/romanian/errmsg.txt
View file @
d310ce76
...
...
@@ -213,5 +213,5 @@
"Lock wait timeout exceeded",
"The total number of locks exceeds the lock table size",
"Update locks cannot be acquired during a READ UNCOMMITTED transaction",
"
Error connecting to master: %-.128s
",
"
Error running query on master: %-.128s
",
"
DROP DATABASE not allowed while thread is holding global read lock
",
"
CREATE DATABASE not allowed while thread is holding global read lock
",
sql/share/russian/errmsg.txt
View file @
d310ce76
...
...
@@ -212,5 +212,5 @@
"Lock wait timeout exceeded",
"The total number of locks exceeds the lock table size",
"Update locks cannot be acquired during a READ UNCOMMITTED transaction",
"
Error connecting to master: %-.128s
",
"
Error running query on master: %-.128s
",
"
DROP DATABASE not allowed while thread is holding global read lock
",
"
CREATE DATABASE not allowed while thread is holding global read lock
",
sql/share/slovak/errmsg.txt
View file @
d310ce76
...
...
@@ -217,5 +217,5 @@
"Lock wait timeout exceeded",
"The total number of locks exceeds the lock table size",
"Update locks cannot be acquired during a READ UNCOMMITTED transaction",
"
Error connecting to master: %-.128s
",
"
Error running query on master: %-.128s
",
"
DROP DATABASE not allowed while thread is holding global read lock
",
"
CREATE DATABASE not allowed while thread is holding global read lock
",
sql/share/spanish/errmsg.txt
View file @
d310ce76
...
...
@@ -210,5 +210,5 @@
"Lock wait timeout exceeded",
"The total number of locks exceeds the lock table size",
"Update locks cannot be acquired during a READ UNCOMMITTED transaction",
"
Error connecting to master: %-.128s
",
"
Error running query on master: %-.128s
",
"
DROP DATABASE not allowed while thread is holding global read lock
",
"
CREATE DATABASE not allowed while thread is holding global read lock
",
sql/share/swedish/errmsg.txt
View file @
d310ce76
...
...
@@ -206,8 +206,8 @@
"Kunde inte starta en tråd för replikering",
"Användare '%-.64s' har redan 'max_user_connections' aktiva inloggningar",
"Du kan endast använda konstant-uttryck med SET",
"
Tiden att få ett lås var för
lång",
"
Antal lås är större än vad som ryms i lock tabe
llen",
"
Du kan inte låsa tabeller/poster under READ UNCOMMITTE
D",
"
Fick fel vid inloggning till master: %-.128s
",
"
Fick fel vid exekvering av fråga på master: %-.12
8s",
"
Lock wait timeout exceeded
",
"
The total number of locks exceeds the lock table size
",
"
Update locks cannot be acquired during a READ UNCOMMITTED transaction
",
"
DROP DATABASE not allowed while thread is holding global read lock
",
"
CREATE DATABASE not allowed while thread is holding global read lock
",
sql/slave.cc
View file @
d310ce76
...
...
@@ -1440,7 +1440,7 @@ the slave thread with \"mysqladmin start-slave\". We stopped at log \
{
// show a little mercy, allow slave to read one more event
// before cutting him off - otherwise he gets stuck
// on Invar events, since they do not advance the offset
// on In
t
var events, since they do not advance the offset
// immediately
if
(
++
stuck_count
>
2
)
events_till_disconnect
++
;
...
...
sql/sql_db.cc
View file @
d310ce76
...
...
@@ -39,6 +39,32 @@ int mysql_create_db(THD *thd, char *db, uint create_options)
DBUG_ENTER
(
"mysql_create_db"
);
VOID
(
pthread_mutex_lock
(
&
LOCK_mysql_create_db
));
VOID
(
pthread_mutex_lock
(
&
LOCK_open
));
// do not create database if another thread is holding read lock
if
(
global_read_lock
)
{
if
(
thd
->
global_read_lock
)
{
net_printf
(
&
thd
->
net
,
ER_CREATE_DB_WITH_READ_LOCK
);
VOID
(
pthread_mutex_unlock
(
&
LOCK_open
));
goto
exit
;
}
while
(
global_read_lock
&&
!
thd
->
killed
)
{
(
void
)
pthread_cond_wait
(
&
COND_refresh
,
&
LOCK_open
);
}
if
(
thd
->
killed
)
{
net_printf
(
&
thd
->
net
,
ER_SERVER_SHUTDOWN
);
VOID
(
pthread_mutex_unlock
(
&
LOCK_open
));
goto
exit
;
}
}
VOID
(
pthread_mutex_unlock
(
&
LOCK_open
));
/* Check directory */
(
void
)
sprintf
(
path
,
"%s/%s"
,
mysql_data_home
,
db
);
...
...
@@ -117,6 +143,26 @@ int mysql_rm_db(THD *thd,char *db,bool if_exists)
VOID
(
pthread_mutex_lock
(
&
LOCK_mysql_create_db
));
VOID
(
pthread_mutex_lock
(
&
LOCK_open
));
// do not drop database if another thread is holding read lock
if
(
global_read_lock
)
{
if
(
thd
->
global_read_lock
)
{
net_printf
(
&
thd
->
net
,
ER_DROP_DB_WITH_READ_LOCK
);
goto
exit
;
}
while
(
global_read_lock
&&
!
thd
->
killed
)
{
(
void
)
pthread_cond_wait
(
&
COND_refresh
,
&
LOCK_open
);
}
if
(
thd
->
killed
)
{
net_printf
(
&
thd
->
net
,
ER_SERVER_SHUTDOWN
);
goto
exit
;
}
}
(
void
)
sprintf
(
path
,
"%s/%s"
,
mysql_data_home
,
db
);
unpack_dirname
(
path
,
path
);
// Convert if not unix
/* See if the directory exists */
...
...
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