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
f85d72e1
Commit
f85d72e1
authored
Jun 23, 2001
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge heikki@work.mysql.com:/home/my/mysql
into donna.mysql.fi:/home/heikki/mysqlf
parents
fb70990c
a72c990f
Changes
36
Hide whitespace changes
Inline
Side-by-side
Showing
36 changed files
with
224 additions
and
19 deletions
+224
-19
Docs/manual.texi
Docs/manual.texi
+29
-4
include/mysqld_error.h
include/mysqld_error.h
+3
-1
mysql-test/r/drop.result
mysql-test/r/drop.result
+9
-0
mysql-test/r/flush.result
mysql-test/r/flush.result
+2
-0
mysql-test/r/show_check.result
mysql-test/r/show_check.result
+10
-0
mysql-test/t/drop.test
mysql-test/t/drop.test
+31
-0
mysql-test/t/flush.test
mysql-test/t/flush.test
+15
-0
mysql-test/t/show_check.test
mysql-test/t/show_check.test
+7
-0
sql/log.cc
sql/log.cc
+4
-0
sql/mysql_priv.h
sql/mysql_priv.h
+1
-1
sql/mysqld.cc
sql/mysqld.cc
+16
-9
sql/share/czech/errmsg.txt
sql/share/czech/errmsg.txt
+2
-0
sql/share/danish/errmsg.txt
sql/share/danish/errmsg.txt
+2
-0
sql/share/dutch/errmsg.txt
sql/share/dutch/errmsg.txt
+2
-0
sql/share/english/errmsg.txt
sql/share/english/errmsg.txt
+2
-0
sql/share/estonian/errmsg.txt
sql/share/estonian/errmsg.txt
+2
-0
sql/share/french/errmsg.txt
sql/share/french/errmsg.txt
+2
-0
sql/share/german/errmsg.txt
sql/share/german/errmsg.txt
+2
-0
sql/share/greek/errmsg.txt
sql/share/greek/errmsg.txt
+2
-0
sql/share/hungarian/errmsg.txt
sql/share/hungarian/errmsg.txt
+2
-0
sql/share/italian/errmsg.txt
sql/share/italian/errmsg.txt
+2
-0
sql/share/japanese/errmsg.txt
sql/share/japanese/errmsg.txt
+2
-0
sql/share/korean/errmsg.txt
sql/share/korean/errmsg.txt
+2
-0
sql/share/norwegian-ny/errmsg.txt
sql/share/norwegian-ny/errmsg.txt
+2
-0
sql/share/norwegian/errmsg.txt
sql/share/norwegian/errmsg.txt
+2
-0
sql/share/polish/errmsg.txt
sql/share/polish/errmsg.txt
+2
-0
sql/share/portuguese/errmsg.txt
sql/share/portuguese/errmsg.txt
+2
-0
sql/share/romanian/errmsg.txt
sql/share/romanian/errmsg.txt
+2
-0
sql/share/russian/errmsg.txt
sql/share/russian/errmsg.txt
+2
-0
sql/share/slovak/errmsg.txt
sql/share/slovak/errmsg.txt
+2
-0
sql/share/spanish/errmsg.txt
sql/share/spanish/errmsg.txt
+2
-0
sql/share/swedish/errmsg.txt
sql/share/swedish/errmsg.txt
+2
-0
sql/slave.cc
sql/slave.cc
+1
-1
sql/sql_db.cc
sql/sql_db.cc
+46
-0
sql/sql_parse.cc
sql/sql_parse.cc
+1
-0
sql/sql_show.cc
sql/sql_show.cc
+7
-3
No files found.
Docs/manual.texi
View file @
f85d72e1
...
...
@@ -4741,7 +4741,7 @@ Please report bad or out-of-date mirrors to @email{webmaster@@mysql.com}.
@c Added 20000925
@image{Flags/usa} USA [ValueClick, Los Angeles CA] @
@uref{http://mysql.valueclick.com/, WWW}
@uref{ftp://mysql.valueclick.com/
mysql
/, FTP}
@uref{ftp://mysql.valueclick.com/
pub/mysql/Downloads
/, FTP}
@c @item
@c Not ok 20000919; Non-existent (Matt)
...
...
@@ -10531,6 +10531,9 @@ Run @code{mysqld} daemon as user @code{user_name}. This option is
@item -V, --version
Output version information and exit.
@item -W, --warnings
Print out warnings like @code{Aborted connection...} to the @code{.err} file.
@xref{Communication errors}.
@end table
@cindex default options
...
...
@@ -25795,8 +25798,8 @@ in its own lock table and rolls back the transaction. If you use
than InnoDB in the same transaction, then a deadlock may arise which
InnoDB cannot notice. In cases like this the timeout is useful to
resolve the situation.
@item @code{innodb_
unix_file_
flush_method} @tab
(Available from 3.23.
39
up.)
@item @code{innodb_flush_method} @tab
(Available from 3.23.
40
up.)
The default value for this is @code{fdatasync}.
Another option is @code{O_DSYNC}.
Options @code{littlesync} and @code{nosync} have the
...
...
@@ -26406,7 +26409,7 @@ In some versions of Linux and Unix, flushing files to disk with the Unix
@code{fdatasync} and other similar methods is surprisingly slow.
The default method InnoDB uses is the @code{fdatasync} function.
If you are not satisfied with the database write performance, you may
try setting @code{innodb_
unix_file_
flush_method} in @file{my.cnf}
try setting @code{innodb_flush_method} in @file{my.cnf}
to @code{O_DSYNC}, though O_DSYNC seems to be slower on most systems.
You can also try setting it to @code{littlesync}, which means that
InnoDB does not call the file flush for every write it does to a
...
...
@@ -38212,6 +38215,9 @@ option.
@node Communication errors, Full table, Packet too large, Common errors
@subsection Communication Errors / Aborted Connection
Starting with @code{MySQL 3.23.40} you only get the @code{Aborted
connection} error of you start @code{mysqld} with @code{--warnings}.
If you find errors like the following in your error log.
@example
...
...
@@ -46298,6 +46304,16 @@ Our TODO section contains what we plan to have in 4.0. @xref{TODO MySQL 4.0}.
Added support for symbolic links to @code{MyISAM} tables. Symlink handling is
now enabled by default for Windows.
@item
@code{LOAD DATA FROM MASTER} "auto-magically" sets up a slave.
@item
A new @code{HANDLER} interface to @code{MyISAM} tables.
@item
@code{COUNT(DISTINCT)} is about 30% faster.
@item
Creating full text indexes are now much faster.
@item
Searching on packed (@code{CHAR}/@code{VARCHAR}) keys are now much faster.
@item
Added @code{SQL_CALC_FOUND_ROWS} and @code{FOUND_ROWS()}. This makes it
possible to know how many rows a query would have returned
without a @code{LIMIT} clause.
...
...
@@ -46406,6 +46422,15 @@ not yet 100% confident in this code.
@appendixsubsec Changes in release 3.23.40
@itemize @bullet
@item
Added option @code{--warnings} to @code{mysqld}. Now @code{mysqld}
only prints the error @code{Aborted connection} if this option is used.
@item
Fixed problem with @code{SHOW CREATE TABLE} when you didn't have a
@code{PRIMARY KEY}.
@item
Fixed properly the rename of @code{innodb_unix_file_flush_method} to
@code{innodb_flush_method}.
@item
Fixed bug when converting @code{UNSIGNED BIGINT} to @code{DOUBLE}. This caused
a problem when doing comparisons with @code{BIGINT}'s outside of the
signed range.
include/mysqld_error.h
View file @
f85d72e1
...
...
@@ -208,4 +208,6 @@
#define ER_LOCK_WAIT_TIMEOUT 1205
#define ER_LOCK_TABLE_FULL 1206
#define ER_READ_ONLY_TRANSACTION 1207
#define ER_ERROR_MESSAGES 208
#define ER_DROP_DB_WITH_READ_LOCK 1208
#define ER_CREATE_DB_WITH_READ_LOCK 1209
#define ER_ERROR_MESSAGES 210
mysql-test/r/drop.result
View file @
f85d72e1
n
1
n
4
Database
foo
mysql
test
Database
mysql
test
mysql-test/r/flush.result
View file @
f85d72e1
n
3
n
23
n
345
mysql-test/r/show_check.result
View file @
f85d72e1
...
...
@@ -80,3 +80,13 @@ t1 CREATE TABLE `t1` (
`test_set` set('val1','val2','val3') NOT NULL default '',
`name` char(20) default 'O''Brien'
) TYPE=MyISAM COMMENT='it''s a table'
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL default '0',
UNIQUE KEY `aa` (`a`)
) TYPE=MyISAM
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL default '0',
PRIMARY KEY (`a`)
) TYPE=MyISAM
mysql-test/t/drop.test
View file @
f85d72e1
...
...
@@ -10,3 +10,34 @@ insert into t1 values(2);
create
table
t1
(
n
int
);
drop
table
t1
;
select
*
from
t1
;
#now test for a bug in drop database - it is important that the name
#of the table is the same as the name of the database - in the original
#code this triggered a bug
drop
database
if
exists
foo
;
create
database
foo
;
drop
database
if
exists
foo
;
create
database
foo
;
create
table
foo
.
foo
(
n
int
);
insert
into
foo
.
foo
values
(
4
);
select
*
from
foo
.
foo
;
drop
database
if
exists
foo
;
create
database
foo
;
drop
database
foo
;
# test drop/create database and FLUSH TABLES WITH READ LOCK
drop
database
if
exists
foo
;
flush
tables
with
read
lock
;
--
error
1209
create
database
foo
;
unlock
tables
;
create
database
foo
;
show
databases
;
flush
tables
with
read
lock
;
--
error
1208
drop
database
foo
;
unlock
tables
;
drop
database
foo
;
show
databases
;
mysql-test/t/flush.test
View file @
f85d72e1
...
...
@@ -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
);
...
...
mysql-test/t/show_check.test
View file @
f85d72e1
...
...
@@ -65,3 +65,10 @@ create table t1 (
)
comment
=
'it\'s a table'
;
show
create
table
t1
;
drop
table
t1
;
create
table
t1
(
a
int
not
null
,
unique
aa
(
a
));
show
create
table
t1
;
drop
table
t1
;
create
table
t1
(
a
int
not
null
,
primary
key
(
a
));
show
create
table
t1
;
drop
table
t1
;
sql/log.cc
View file @
f85d72e1
...
...
@@ -652,12 +652,16 @@ bool MYSQL_LOG::write(Query_log_event* event_info)
if
(
thd
->
last_insert_id_used
)
{
Intvar_log_event
e
((
uchar
)
LAST_INSERT_ID_EVENT
,
thd
->
last_insert_id
);
if
(
thd
->
server_id
)
e
.
server_id
=
thd
->
server_id
;
if
(
e
.
write
(
file
))
goto
err
;
}
if
(
thd
->
insert_id_used
)
{
Intvar_log_event
e
((
uchar
)
INSERT_ID_EVENT
,
thd
->
last_insert_id
);
if
(
thd
->
server_id
)
e
.
server_id
=
thd
->
server_id
;
if
(
e
.
write
(
file
))
goto
err
;
}
...
...
sql/mysql_priv.h
View file @
f85d72e1
...
...
@@ -533,7 +533,7 @@ extern ulong keybuff_size,sortbuff_size,max_item_sort_length,table_cache_size,
binlog_cache_size
,
max_binlog_cache_size
;
extern
ulong
specialflag
,
current_pid
;
extern
bool
low_priority_updates
,
using_update_log
;
extern
bool
opt_sql_bin_update
,
opt_safe_show_db
;
extern
bool
opt_sql_bin_update
,
opt_safe_show_db
,
opt_warnings
;
extern
char
language
[
LIBLEN
],
reg_ext
[
FN_EXTLEN
],
blob_newline
;
extern
const
char
**
errmesg
;
/* Error messages */
extern
const
char
*
default_tx_isolation_name
;
...
...
sql/mysqld.cc
View file @
f85d72e1
...
...
@@ -210,7 +210,7 @@ static char mysql_home[FN_REFLEN],pidfile_name[FN_REFLEN];
static
pthread_t
select_thread
;
static
bool
opt_log
,
opt_update_log
,
opt_bin_log
,
opt_slow_log
,
opt_noacl
,
opt_disable_networking
=
0
,
opt_bootstrap
=
0
,
opt_skip_show_db
=
0
,
opt_ansi_mode
=
0
,
opt_myisam_log
=
0
,
opt_ansi_mode
=
0
,
opt_myisam_log
=
0
,
opt_large_files
=
sizeof
(
my_off_t
)
>
4
;
bool
opt_sql_bin_update
=
0
,
opt_log_slave_updates
=
0
,
opt_safe_show_db
=
0
;
FILE
*
bootstrap_file
=
0
;
...
...
@@ -275,7 +275,7 @@ ulong max_tmp_tables,max_heap_table_size;
ulong
bytes_sent
=
0L
,
bytes_received
=
0L
;
bool
opt_endinfo
,
using_udf_functions
,
low_priority_updates
,
locked_in_memory
;
bool
opt_using_transactions
,
using_update_log
;
bool
opt_using_transactions
,
using_update_log
,
opt_warnings
=
0
;
bool
volatile
abort_loop
,
select_thread_in_use
,
grant_option
;
bool
volatile
ready_to_exit
,
shutdown_in_progress
;
ulong
refresh_version
=
1L
,
flush_version
=
1L
;
/* Increments on each reload */
...
...
@@ -1190,7 +1190,7 @@ Some pointers may be invalid and cause the dump to abort...\n");
fprintf
(
stderr
,
"
\n
Successfully dumped variables, if you ran with --log, take a look at the
\n
\
details of what thread %ld did to cause the crash. In some cases of really
\n
\
bad corruption, the
above values
may be invalid
\n\n
"
,
bad corruption, the
values shown above
may be invalid
\n\n
"
,
thd
->
thread_id
);
}
fprintf
(
stderr
,
"\
...
...
@@ -2455,7 +2455,7 @@ enum options {
OPT_INNODB_LOG_ARCH_DIR
,
OPT_INNODB_LOG_ARCHIVE
,
OPT_INNODB_FLUSH_LOG_AT_TRX_COMMIT
,
OPT_
INNODB_UNIX_FILE_FLUSH_METHOD
,
OPT_
innodb_flush_method
,
OPT_SAFE_SHOW_DB
,
OPT_GEMINI_SKIP
,
OPT_INNODB_SKIP
,
OPT_TEMP_POOL
,
OPT_TX_ISOLATION
,
...
...
@@ -2516,7 +2516,7 @@ static struct option long_options[] = {
OPT_INNODB_LOG_ARCHIVE
},
{
"innodb_flush_log_at_trx_commit"
,
optional_argument
,
0
,
OPT_INNODB_FLUSH_LOG_AT_TRX_COMMIT
},
{
"innodb_
unix_file_
flush_method"
,
required_argument
,
0
,
{
"innodb_flush_method"
,
required_argument
,
0
,
OPT_INNODB_UNIX_FILE_FLUSH_METHOD
},
#endif
{
"help"
,
no_argument
,
0
,
'?'
},
...
...
@@ -2603,6 +2603,7 @@ static struct option long_options[] = {
#endif
{
"user"
,
required_argument
,
0
,
'u'
},
{
"version"
,
no_argument
,
0
,
'V'
},
{
"warnings"
,
no_argument
,
0
,
'W'
},
{
0
,
0
,
0
,
0
}
};
...
...
@@ -2796,7 +2797,7 @@ struct show_var_st init_vars[]= {
{
"innodb_log_arch_dir"
,
(
char
*
)
&
innobase_log_arch_dir
,
SHOW_CHAR_PTR
},
{
"innodb_log_archive"
,
(
char
*
)
&
innobase_log_archive
,
SHOW_MY_BOOL
},
{
"innodb_log_group_home_dir"
,
(
char
*
)
&
innobase_log_group_home_dir
,
SHOW_CHAR_PTR
},
{
"innodb_
unix_file_
flush_method"
,
(
char
*
)
&
innobase_unix_file_flush_method
,
SHOW_CHAR_PTR
},
{
"innodb_flush_method"
,
(
char
*
)
&
innobase_unix_file_flush_method
,
SHOW_CHAR_PTR
},
#endif
{
"interactive_timeout"
,
(
char
*
)
&
net_interactive_timeout
,
SHOW_LONG
},
{
"join_buffer_size"
,
(
char
*
)
&
join_buff_size
,
SHOW_LONG
},
...
...
@@ -3010,6 +3011,8 @@ static void usage(void)
Start without grant tables. This gives all users
\n
\
FULL ACCESS to all tables!
\n
\
--safe-mode Skip some optimize stages (for testing)
\n
\
--safe-show-database Don't show databases for which the user has no
\n
\
privileges
\n
\
--skip-concurrent-insert
\n
\
Don't use concurrent insert with MyISAM
\n
\
--skip-delay-key-write
\n
\
...
...
@@ -3033,7 +3036,8 @@ static void usage(void)
Default transaction isolation level
\n
\
--temp-pool Use a pool of temporary files
\n
\
-u, --user=user_name Run mysqld daemon as user
\n
\
-V, --version output version information and exit"
);
-V, --version output version information and exit
\n
\
-W, --warnings Log some not critical warnings to the log file
\n
"
);
#ifdef __WIN__
puts
(
"NT and Win32 specific options:
\n
\
--console Don't remove the console window
\n
\
...
...
@@ -3073,7 +3077,7 @@ static void usage(void)
puts
(
"\
--innodb_data_home_dir=dir The common part for Innodb table spaces
\n
\
--innodb_data_file_path=dir Path to individual files and their sizes
\n
\
--innodb_
unix_file_
flush_method=# With which method to flush data
\n
\
--innodb_flush_method=# With which method to flush data
\n
\
--innodb_flush_log_at_trx_commit[=#]
\n
\
Set to 0 if you don't want to flush logs
\n
\
--innodb_log_arch_dir=dir Where full logs should be archived
\n
\
...
...
@@ -3167,7 +3171,7 @@ static void get_options(int argc,char **argv)
int
c
,
option_index
=
0
;
myisam_delay_key_write
=
1
;
// Allow use of this
while
((
c
=
getopt_long
(
argc
,
argv
,
"ab:C:h:#::T::?l::L:O:P:sS::t:u:noVvI?"
,
while
((
c
=
getopt_long
(
argc
,
argv
,
"ab:C:h:#::T::?l::L:O:P:sS::t:u:noVv
W
I?"
,
long_options
,
&
option_index
))
!=
EOF
)
{
switch
(
c
)
{
...
...
@@ -3177,6 +3181,9 @@ static void get_options(int argc,char **argv)
#endif
opt_endinfo
=
1
;
/* unireg: memory allocation */
break
;
case
'W'
:
opt_warnings
=
1
;
break
;
case
'a'
:
opt_ansi_mode
=
1
;
thd_startup_options
|=
OPTION_ANSI_MODE
;
...
...
sql/share/czech/errmsg.txt
View file @
f85d72e1
...
...
@@ -218,3 +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",
"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 @
f85d72e1
...
...
@@ -212,3 +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",
"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 @
f85d72e1
...
...
@@ -209,3 +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",
"DROP DATABASE not allowed while thread is holding global read lock",
"CREATE DATABASE not allowed while thread is holding global read lock",
sql/share/english/errmsg.txt
View file @
f85d72e1
...
...
@@ -209,3 +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",
"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 @
f85d72e1
...
...
@@ -213,3 +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",
"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 @
f85d72e1
...
...
@@ -209,3 +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",
"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 @
f85d72e1
...
...
@@ -212,3 +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",
"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 @
f85d72e1
...
...
@@ -209,3 +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",
"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 @
f85d72e1
...
...
@@ -211,3 +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",
"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 @
f85d72e1
...
...
@@ -209,3 +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",
"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 @
f85d72e1
...
...
@@ -211,3 +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",
"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 @
f85d72e1
...
...
@@ -209,3 +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",
"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 @
f85d72e1
...
...
@@ -211,3 +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",
"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 @
f85d72e1
...
...
@@ -211,3 +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",
"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 @
f85d72e1
...
...
@@ -213,3 +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",
"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 @
f85d72e1
...
...
@@ -209,3 +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",
"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 @
f85d72e1
...
...
@@ -213,3 +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",
"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 @
f85d72e1
...
...
@@ -212,3 +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",
"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 @
f85d72e1
...
...
@@ -217,3 +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",
"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 @
f85d72e1
...
...
@@ -210,3 +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",
"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 @
f85d72e1
...
...
@@ -209,3 +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",
"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 @
f85d72e1
...
...
@@ -1367,7 +1367,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 @
f85d72e1
...
...
@@ -38,6 +38,32 @@ void 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
);
...
...
@@ -105,6 +131,26 @@ void 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 */
...
...
sql/sql_parse.cc
View file @
f85d72e1
...
...
@@ -554,6 +554,7 @@ pthread_handler_decl(handle_one_connection,arg)
free_root
(
&
thd
->
mem_root
,
MYF
(
0
));
if
(
net
->
error
&&
net
->
vio
!=
0
)
{
if
(
!
thd
->
killed
&&
!
opt_warnings
)
sql_print_error
(
ER
(
ER_NEW_ABORTING_CONNECTION
),
thd
->
thread_id
,(
thd
->
db
?
thd
->
db
:
"unconnected"
),
thd
->
user
?
thd
->
user
:
"unauthenticated"
,
...
...
sql/sql_show.cc
View file @
f85d72e1
...
...
@@ -839,18 +839,22 @@ store_create_info(THD *thd, TABLE *table, String *packet)
for
(
uint
i
=
0
;
i
<
table
->
keys
;
i
++
,
key_info
++
)
{
KEY_PART_INFO
*
key_part
=
key_info
->
key_part
;
bool
found_primary
=
0
;
packet
->
append
(
",
\n
"
,
4
);
KEY_PART_INFO
*
key_part
=
key_info
->
key_part
;
if
(
i
==
primary_key
)
if
(
i
==
primary_key
&&
!
strcmp
(
key_info
->
name
,
"PRIMARY"
))
{
found_primary
=
1
;
packet
->
append
(
"PRIMARY "
,
8
);
}
else
if
(
key_info
->
flags
&
HA_NOSAME
)
packet
->
append
(
"UNIQUE "
,
7
);
else
if
(
key_info
->
flags
&
HA_FULLTEXT
)
packet
->
append
(
"FULLTEXT "
,
9
);
packet
->
append
(
"KEY "
,
4
);
if
(
i
!=
primary_ke
y
)
if
(
!
found_primar
y
)
append_identifier
(
thd
,
packet
,
key_info
->
name
);
packet
->
append
(
" ("
,
2
);
...
...
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