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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
35c09b80
Commit
35c09b80
authored
Oct 15, 2003
by
monty@mashka.mysql.fi
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into mashka.mysql.fi:/home/my/mysql-4.0
parents
b5849f45
da97e073
Changes
19
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
141 additions
and
46 deletions
+141
-46
VC++Files/mysqlshutdown/MYSQL.ICO
VC++Files/mysqlshutdown/MYSQL.ICO
+0
-0
client/client_priv.h
client/client_priv.h
+1
-1
include/queues.h
include/queues.h
+1
-0
include/thr_alarm.h
include/thr_alarm.h
+1
-0
myisam/myisamchk.c
myisam/myisamchk.c
+1
-1
mysql-test/r/create.result
mysql-test/r/create.result
+22
-0
mysql-test/t/create.test
mysql-test/t/create.test
+21
-1
mysql-test/t/mysqlbinlog.test
mysql-test/t/mysqlbinlog.test
+8
-8
mysys/queues.c
mysys/queues.c
+17
-7
mysys/thr_alarm.c
mysys/thr_alarm.c
+10
-0
scripts/mysql_config.sh
scripts/mysql_config.sh
+1
-1
scripts/mysqld_safe.sh
scripts/mysqld_safe.sh
+13
-9
sql/mysqld.cc
sql/mysqld.cc
+1
-1
sql/set_var.cc
sql/set_var.cc
+15
-6
sql/slave.cc
sql/slave.cc
+3
-2
sql/sql_class.h
sql/sql_class.h
+2
-2
sql/sql_handler.cc
sql/sql_handler.cc
+11
-4
sql/sql_insert.cc
sql/sql_insert.cc
+12
-2
sql/sql_parse.cc
sql/sql_parse.cc
+1
-1
No files found.
VC++Files/mysqlshutdown/MYSQL.ICO
deleted
100644 → 0
View file @
b5849f45
318 Bytes
client/client_priv.h
View file @
35c09b80
...
...
@@ -26,7 +26,7 @@
/* We have to define 'enum options' identical in all files to keep OS2 happy */
enum
options
{
OPT_CHARSETS_DIR
=
256
,
OPT_DEFAULT_CHARSET
,
enum
options
_client
{
OPT_CHARSETS_DIR
=
256
,
OPT_DEFAULT_CHARSET
,
OPT_PAGER
,
OPT_NOPAGER
,
OPT_TEE
,
OPT_NOTEE
,
OPT_LOW_PRIORITY
,
OPT_AUTO_REPAIR
,
OPT_COMPRESS
,
OPT_DROP
,
OPT_LOCKS
,
OPT_KEYWORDS
,
OPT_DELAYED
,
OPT_OPTIMIZE
,
...
...
include/queues.h
View file @
35c09b80
...
...
@@ -49,6 +49,7 @@ int init_queue(QUEUE *queue,uint max_elements,uint offset_to_key,
int
reinit_queue
(
QUEUE
*
queue
,
uint
max_elements
,
uint
offset_to_key
,
pbool
max_at_top
,
queue_compare
compare
,
void
*
first_cmp_arg
);
int
resize_queue
(
QUEUE
*
queue
,
uint
max_elements
);
void
delete_queue
(
QUEUE
*
queue
);
void
queue_insert
(
QUEUE
*
queue
,
byte
*
element
);
byte
*
queue_remove
(
QUEUE
*
queue
,
uint
idx
);
...
...
include/thr_alarm.h
View file @
35c09b80
...
...
@@ -100,6 +100,7 @@ typedef struct st_alarm {
#define thr_alarm_init(A) (*(A))=0
#define thr_alarm_in_use(A) (*(A)!= 0)
void
init_thr_alarm
(
uint
max_alarm
);
void
resize_thr_alarm
(
uint
max_alarms
);
my_bool
thr_alarm
(
thr_alarm_t
*
alarmed
,
uint
sec
,
ALARM
*
buff
);
void
thr_alarm_kill
(
pthread_t
thread_id
);
void
thr_end_alarm
(
thr_alarm_t
*
alarmed
);
...
...
myisam/myisamchk.c
View file @
35c09b80
...
...
@@ -144,7 +144,7 @@ int main(int argc, char **argv)
#endif
}
/* main */
enum
options
{
enum
options
_mc
{
OPT_CHARSETS_DIR
=
256
,
OPT_SET_CHARSET
,
OPT_START_CHECK_POS
,
OPT_CORRECT_CHECKSUM
,
OPT_KEY_BUFFER_SIZE
,
OPT_MYISAM_BLOCK_SIZE
,
OPT_READ_BUFFER_SIZE
,
OPT_WRITE_BUFFER_SIZE
,
OPT_SORT_BUFFER_SIZE
,
...
...
mysql-test/r/create.result
View file @
35c09b80
...
...
@@ -178,3 +178,25 @@ Column 'k1' cannot be null
drop table t1;
create table t1 select x'4132';
drop table t1;
create table t1 select 1,2,3;
create table if not exists t1 select 1,2;
create table if not exists t1 select 1,2,3,4;
Column count doesn't match value count at row 1
create table if not exists t1 select 1;
select * from t1;
1 2 3
1 2 3
0 1 2
0 0 1
drop table t1;
create table t1 select 1,2,3;
create table if not exists t1 select 1,2;
create table if not exists t1 select 1,2,3,4;
Column count doesn't match value count at row 1
create table if not exists t1 select 1;
select * from t1;
1 2 3
1 2 3
0 1 2
0 0 1
drop table t1;
mysql-test/t/create.test
View file @
35c09b80
...
...
@@ -129,8 +129,28 @@ insert into t1 values ("a", 1), ("b", 2);
drop
table
t1
;
#
# Bug #
801
# Bug #801
#
create
table
t1
select
x
'4132'
;
drop
table
t1
;
#
# bug #1434
#
create
table
t1
select
1
,
2
,
3
;
create
table
if
not
exists
t1
select
1
,
2
;
--
error
1136
create
table
if
not
exists
t1
select
1
,
2
,
3
,
4
;
create
table
if
not
exists
t1
select
1
;
select
*
from
t1
;
drop
table
t1
;
create
table
t1
select
1
,
2
,
3
;
create
table
if
not
exists
t1
select
1
,
2
;
--
error
1136
create
table
if
not
exists
t1
select
1
,
2
,
3
,
4
;
create
table
if
not
exists
t1
select
1
;
select
*
from
t1
;
drop
table
t1
;
mysql-test/t/mysqlbinlog.test
View file @
35c09b80
...
...
@@ -39,28 +39,28 @@ select "--- Local --" as "";
#
--
replace_result
$MYSQL_TEST_DIR
MYSQL_TEST_DIR
--
exec
$MYSQL_BINLOG
--
short
-
form
$MYSQL_TEST_DIR
/
var
/
log
/
master
-
bin
.
001
--
exec
$MYSQL_BINLOG
--
short
-
form
--
local
-
load
=
$MYSQL_TEST_DIR
/
var
/
tmp
/
$MYSQL_TEST_DIR
/
var
/
log
/
master
-
bin
.
001
# this should not fail but shouldn't produce any working statements
--
disable_query_log
select
"--- Broken LOAD DATA --"
as
""
;
--
enable_query_log
--
replace_result
$MYSQL_TEST_DIR
MYSQL_TEST_DIR
--
exec
$MYSQL_BINLOG
--
short
-
form
$MYSQL_TEST_DIR
/
var
/
log
/
master
-
bin
.
002
--
exec
$MYSQL_BINLOG
--
short
-
form
--
local
-
load
=
$MYSQL_TEST_DIR
/
var
/
tmp
/
$MYSQL_TEST_DIR
/
var
/
log
/
master
-
bin
.
002
# this should show almost nothing
--
disable_query_log
select
"--- --database --"
as
""
;
--
enable_query_log
--
replace_result
$MYSQL_TEST_DIR
MYSQL_TEST_DIR
--
exec
$MYSQL_BINLOG
--
short
-
form
--
database
=
nottest
$MYSQL_TEST_DIR
/
var
/
log
/
master
-
bin
.
001
--
exec
$MYSQL_BINLOG
--
short
-
form
--
local
-
load
=
$MYSQL_TEST_DIR
/
var
/
tmp
/
--
database
=
nottest
$MYSQL_TEST_DIR
/
var
/
log
/
master
-
bin
.
001
# this test for position option
--
disable_query_log
select
"--- --position --"
as
""
;
--
enable_query_log
--
replace_result
$MYSQL_TEST_DIR
MYSQL_TEST_DIR
--
exec
$MYSQL_BINLOG
--
short
-
form
--
position
=
27
$MYSQL_TEST_DIR
/
var
/
log
/
master
-
bin
.
002
--
exec
$MYSQL_BINLOG
--
short
-
form
--
local
-
load
=
$MYSQL_TEST_DIR
/
var
/
tmp
/
--
position
=
27
$MYSQL_TEST_DIR
/
var
/
log
/
master
-
bin
.
002
# These are tests for remote binlog.
# They should return the same as previous test.
...
...
@@ -76,28 +76,28 @@ select "--- Remote --" as "";
# This is broken now
# By the way it seems that remote version fetches all events with name >= master-bin.001
--
replace_result
$MYSQL_TEST_DIR
MYSQL_TEST_DIR
--
exec
$MYSQL_BINLOG
--
short
-
form
--
read
-
from
-
remote
-
server
--
user
=
root
--
host
=
127.0
.
0.1
--
port
=
$MASTER_MYPORT
master
-
bin
.
001
--
exec
$MYSQL_BINLOG
--
short
-
form
--
local
-
load
=
$MYSQL_TEST_DIR
/
var
/
tmp
/
--
read
-
from
-
remote
-
server
--
user
=
root
--
host
=
127.0
.
0.1
--
port
=
$MASTER_MYPORT
master
-
bin
.
001
# This is broken too
--
disable_query_log
select
"--- Broken LOAD DATA --"
as
""
;
--
enable_query_log
--
replace_result
$MYSQL_TEST_DIR
MYSQL_TEST_DIR
--
exec
$MYSQL_BINLOG
--
short
-
form
--
read
-
from
-
remote
-
server
--
user
=
root
--
host
=
127.0
.
0.1
--
port
=
$MASTER_MYPORT
master
-
bin
.
002
--
exec
$MYSQL_BINLOG
--
short
-
form
--
local
-
load
=
$MYSQL_TEST_DIR
/
var
/
tmp
/
--
read
-
from
-
remote
-
server
--
user
=
root
--
host
=
127.0
.
0.1
--
port
=
$MASTER_MYPORT
master
-
bin
.
002
# And this too ! (altough it is documented)
--
disable_query_log
select
"--- --database --"
as
""
;
--
enable_query_log
--
replace_result
$MYSQL_TEST_DIR
MYSQL_TEST_DIR
--
exec
$MYSQL_BINLOG
--
short
-
form
--
read
-
from
-
remote
-
server
--
user
=
root
--
host
=
127.0
.
0.1
--
port
=
$MASTER_MYPORT
--
database
=
nottest
master
-
bin
.
001
--
exec
$MYSQL_BINLOG
--
short
-
form
--
local
-
load
=
$MYSQL_TEST_DIR
/
var
/
tmp
/
--
read
-
from
-
remote
-
server
--
user
=
root
--
host
=
127.0
.
0.1
--
port
=
$MASTER_MYPORT
--
database
=
nottest
master
-
bin
.
001
# Strangely but this works
--
disable_query_log
select
"--- --position --"
as
""
;
--
enable_query_log
--
replace_result
$MYSQL_TEST_DIR
MYSQL_TEST_DIR
--
exec
$MYSQL_BINLOG
--
short
-
form
--
read
-
from
-
remote
-
server
--
position
=
27
--
user
=
root
--
host
=
127.0
.
0.1
--
port
=
$MASTER_MYPORT
master
-
bin
.
002
--
exec
$MYSQL_BINLOG
--
short
-
form
--
local
-
load
=
$MYSQL_TEST_DIR
/
var
/
tmp
/
--
read
-
from
-
remote
-
server
--
position
=
27
--
user
=
root
--
host
=
127.0
.
0.1
--
port
=
$MASTER_MYPORT
master
-
bin
.
002
# clean up
drop
table
t1
;
mysys/queues.c
View file @
35c09b80
...
...
@@ -44,25 +44,35 @@ int init_queue(QUEUE *queue, uint max_elements, uint offset_to_key,
}
/*
Reinitialize queue for new usage; Note that you can't currently resize
the number of elements! If you need this, fix it :)
Reinitialize queue for new usage;
*/
int
reinit_queue
(
QUEUE
*
queue
,
uint
max_elements
,
uint
offset_to_key
,
pbool
max_at_top
,
int
(
*
compare
)
(
void
*
,
byte
*
,
byte
*
),
void
*
first_cmp_arg
)
{
DBUG_ENTER
(
"reinit_queue"
);
if
(
queue
->
max_elements
<
max_elements
)
/* It's real easy to do realloc here, just don't want to bother */
DBUG_RETURN
(
my_errno
=
EE_OUTOFMEMORY
);
queue
->
elements
=
0
;
queue
->
compare
=
compare
;
queue
->
first_cmp_arg
=
first_cmp_arg
;
queue
->
offset_to_key
=
offset_to_key
;
queue
->
max_at_top
=
max_at_top
?
(
-
1
^
1
)
:
0
;
resize_queue
(
queue
,
max_elements
);
DBUG_RETURN
(
0
);
}
int
resize_queue
(
QUEUE
*
queue
,
uint
max_elements
)
{
byte
**
new_root
;
DBUG_ENTER
(
"resize_queue"
);
if
(
queue
->
max_elements
==
max_elements
)
DBUG_RETURN
(
0
);
if
((
new_root
=
(
byte
**
)
my_realloc
((
void
*
)
queue
->
root
,
(
max_elements
+
1
)
*
sizeof
(
void
*
),
MYF
(
MY_WME
)))
==
0
)
DBUG_RETURN
(
1
);
set_if_smaller
(
queue
->
elements
,
max_elements
);
queue
->
max_elements
=
max_elements
;
queue
->
root
=
new_root
;
DBUG_RETURN
(
0
);
}
...
...
mysys/thr_alarm.c
View file @
35c09b80
...
...
@@ -120,6 +120,16 @@ void init_thr_alarm(uint max_alarms)
DBUG_VOID_RETURN
;
}
void
resize_thr_alarm
(
uint
max_alarms
)
{
pthread_mutex_lock
(
&
LOCK_alarm
);
/* it's ok not to shrink the queue sometimes */
if
(
alarm_queue
.
elements
<
max_alarms
)
resize_queue
(
&
alarm_queue
,
max_alarms
+
1
);
pthread_mutex_unlock
(
&
LOCK_alarm
);
return
;
}
/*
Request alarm after sec seconds.
...
...
scripts/mysql_config.sh
View file @
35c09b80
...
...
@@ -62,7 +62,7 @@ get_full_path ()
{
case
$1
in
/
*
)
echo
"
$1
"
;;
./
*
)
tmp
=
`
pwd
`
/
$1
;
echo
$tmp
|
sed
-e
's;/./;/;'
;;
./
*
)
tmp
=
`
pwd
`
/
$1
;
echo
$tmp
|
sed
-e
's;/
\
./;/;'
;;
*
)
which
$1
;;
esac
}
...
...
scripts/mysqld_safe.sh
View file @
35c09b80
...
...
@@ -51,9 +51,9 @@ parse_arguments() {
;;
# these two might have been set in a [mysqld_safe] section of my.cnf
# they
get passed via environment variables to mysqld_safe
--socket
=
*
)
MYSQL_UNIX_PORT
=
`
echo
"
$arg
"
|
sed
-e
"s;--socket=;;"
`
;;
--port
=
*
)
MYSQL_TCP_PORT
=
`
echo
"
$arg
"
|
sed
-e
"s;--port=;;"
`
;;
# they
are added to mysqld command line to override settings from my.cnf
--socket
=
*
)
mysql_unix_port
=
`
echo
"
$arg
"
|
sed
-e
"s;--socket=;;"
`
;;
--port
=
*
)
mysql_tcp_port
=
`
echo
"
$arg
"
|
sed
-e
"s;--port=;;"
`
;;
# mysqld_safe-specific options - must be set in my.cnf ([mysqld_safe])!
--ledir
=
*
)
ledir
=
`
echo
"
$arg
"
|
sed
-e
"s;--ledir=;;"
`
;;
...
...
@@ -114,8 +114,7 @@ else
ledir
=
@libexecdir@
fi
MYSQL_UNIX_PORT
=
${
MYSQL_UNIX_PORT
:-
@MYSQL_UNIX_ADDR@
}
MYSQL_TCP_PORT
=
${
MYSQL_TCP_PORT
:-
@MYSQL_TCP_PORT@
}
safe_mysql_unix_port
=
${
mysql_unix_port
:-${
MYSQL_UNIX_PORT
:-
@MYSQL_UNIX_ADDR@
}}
user
=
@MYSQLD_USER@
niceness
=
0
...
...
@@ -171,9 +170,14 @@ else
fi
test
-z
"
$err_log
"
&&
err_log
=
$DATADIR
/
`
@HOSTNAME@
`
.err
export
MYSQL_UNIX_PORT
export
MYSQL_TCP_PORT
if
test
-n
"
$mysql_unix_port
"
then
args
=
"--socket=
$mysql_unix_port
$args
"
fi
if
test
-n
"
$mysql_tcp_port
"
then
args
=
"--port=
$mysql_tcp_port
$args
"
fi
if
test
$niceness
-eq
0
then
...
...
@@ -296,7 +300,7 @@ echo "Starting $MYSQLD daemon with databases from $DATADIR"
echo
"
`
date
+
'%y%m%d %H:%M:%S mysqld started'
`
"
>>
$err_log
while
true
do
rm
-f
$
MYSQL_UNIX_PORT
$pid_file
# Some extra safety
rm
-f
$
safe_mysql_unix_port
$pid_file
# Some extra safety
if
test
-z
"
$args
"
then
$NOHUP_NICENESS
$ledir
/
$MYSQLD
$defaults
--basedir
=
$MY_BASEDIR_VERSION
--datadir
=
$DATADIR
$USER_OPTION
--pid-file
=
$pid_file
@MYSQLD_DEFAULT_SWITCHES@
>>
$err_log
2>&1
...
...
sql/mysqld.cc
View file @
35c09b80
...
...
@@ -3134,7 +3134,7 @@ extern "C" pthread_handler_decl(handle_connections_namedpipes,arg)
** handle start options
******************************************************************************/
enum
options
{
enum
options
_mysqld
{
OPT_ISAM_LOG
=
256
,
OPT_SKIP_NEW
,
OPT_SKIP_GRANT
,
OPT_SKIP_LOCK
,
OPT_ENABLE_LOCK
,
OPT_USE_LOCKING
,
...
...
sql/set_var.cc
View file @
35c09b80
...
...
@@ -86,6 +86,7 @@ static void fix_myisam_max_extra_sort_file_size(THD *thd, enum_var_type type);
static
void
fix_myisam_max_sort_file_size
(
THD
*
thd
,
enum_var_type
type
);
static
void
fix_max_binlog_size
(
THD
*
thd
,
enum_var_type
type
);
static
void
fix_max_relay_log_size
(
THD
*
thd
,
enum_var_type
type
);
static
void
fix_max_connections
(
THD
*
thd
,
enum_var_type
type
);
/*
Variable definition list
...
...
@@ -147,7 +148,8 @@ sys_var_long_ptr sys_max_binlog_size("max_binlog_size",
&
max_binlog_size
,
fix_max_binlog_size
);
sys_var_long_ptr
sys_max_connections
(
"max_connections"
,
&
max_connections
);
&
max_connections
,
fix_max_connections
);
sys_var_long_ptr
sys_max_connect_errors
(
"max_connect_errors"
,
&
max_connect_errors
);
sys_var_long_ptr
sys_max_delayed_threads
(
"max_delayed_threads"
,
...
...
@@ -714,7 +716,7 @@ static void fix_key_buffer_size(THD *thd, enum_var_type type)
}
void
fix_delay_key_write
(
THD
*
thd
,
enum_var_type
type
)
extern
void
fix_delay_key_write
(
THD
*
thd
,
enum_var_type
type
)
{
switch
((
enum_delay_key_write
)
delay_key_write_options
)
{
case
DELAY_KEY_WRITE_NONE
:
...
...
@@ -730,7 +732,7 @@ void fix_delay_key_write(THD *thd, enum_var_type type)
}
}
void
fix_max_binlog_size
(
THD
*
thd
,
enum_var_type
type
)
static
void
fix_max_binlog_size
(
THD
*
thd
,
enum_var_type
type
)
{
DBUG_ENTER
(
"fix_max_binlog_size"
);
DBUG_PRINT
(
"info"
,(
"max_binlog_size=%lu max_relay_log_size=%lu"
,
...
...
@@ -741,7 +743,7 @@ void fix_max_binlog_size(THD *thd, enum_var_type type)
DBUG_VOID_RETURN
;
}
void
fix_max_relay_log_size
(
THD
*
thd
,
enum_var_type
type
)
static
void
fix_max_relay_log_size
(
THD
*
thd
,
enum_var_type
type
)
{
DBUG_ENTER
(
"fix_max_relay_log_size"
);
DBUG_PRINT
(
"info"
,(
"max_binlog_size=%lu max_relay_log_size=%lu"
,
...
...
@@ -751,6 +753,13 @@ void fix_max_relay_log_size(THD *thd, enum_var_type type)
DBUG_VOID_RETURN
;
}
#include <thr_alarm.h>
static
void
fix_max_connections
(
THD
*
thd
,
enum_var_type
type
)
{
resize_thr_alarm
(
max_connections
);
}
bool
sys_var_long_ptr
::
update
(
THD
*
thd
,
set_var
*
var
)
{
ulonglong
tmp
=
var
->
value
->
val_int
();
...
...
sql/slave.cc
View file @
35c09b80
...
...
@@ -1017,11 +1017,12 @@ static int check_master_version(MYSQL* mysql, MASTER_INFO* mi)
BINLOG_FORMAT_323_GEQ_57
;
break
;
case
'4'
:
case
'5'
:
mi
->
old_format
=
BINLOG_FORMAT_CURRENT
;
break
;
default:
errmsg
=
"Master reported unrecognized MySQL version"
;
/* 5.0 is not supported */
errmsg
=
"Master reported an unrecognized MySQL version. Note that 4.0 \
slaves can't replicate a 5.0 or newer master."
;
break
;
}
...
...
sql/sql_class.h
View file @
35c09b80
...
...
@@ -708,6 +708,7 @@ class select_create: public select_insert {
HA_CREATE_INFO
*
create_info
;
MYSQL_LOCK
*
lock
;
Field
**
field
;
my_bool
do_not_drop
;
public:
select_create
(
const
char
*
db_name
,
const
char
*
table_name
,
HA_CREATE_INFO
*
create_info_par
,
...
...
@@ -716,8 +717,7 @@ public:
List
<
Item
>
&
select_fields
,
enum_duplicates
duplic
)
:
select_insert
(
NULL
,
&
select_fields
,
duplic
),
db
(
db_name
),
name
(
table_name
),
extra_fields
(
&
fields_par
),
keys
(
&
keys_par
),
create_info
(
create_info_par
),
lock
(
0
)
create_info
(
create_info_par
),
lock
(
0
),
do_not_drop
(
0
)
{}
int
prepare
(
List
<
Item
>
&
list
);
bool
send_data
(
List
<
Item
>
&
values
);
...
...
sql/sql_handler.cc
View file @
35c09b80
...
...
@@ -34,7 +34,7 @@
The second is to be freeed only on thread end. mysql_ha_open should
then do { handler_items=concat(handler_items, free_list); free_list=0; }
But !!! do_c
a
mmand calls free_root at the end of every query and frees up
But !!! do_c
o
mmand calls free_root at the end of every query and frees up
all the sql_alloc'ed memory. It's harder to work around...
*/
...
...
@@ -73,7 +73,11 @@ int mysql_ha_close(THD *thd, TABLE_LIST *tables, bool dont_send_ok)
if
(
*
ptr
)
{
VOID
(
pthread_mutex_lock
(
&
LOCK_open
));
close_thread_table
(
thd
,
ptr
);
if
(
close_thread_table
(
thd
,
ptr
))
{
/* Tell threads waiting for refresh that something has happened */
VOID
(
pthread_cond_broadcast
(
&
COND_refresh
));
}
VOID
(
pthread_mutex_unlock
(
&
LOCK_open
));
}
else
...
...
@@ -90,8 +94,11 @@ int mysql_ha_close(THD *thd, TABLE_LIST *tables, bool dont_send_ok)
int
mysql_ha_closeall
(
THD
*
thd
,
TABLE_LIST
*
tables
)
{
TABLE
**
ptr
=
find_table_ptr_by_name
(
thd
,
tables
->
db
,
tables
->
real_name
,
0
);
if
(
*
ptr
)
close_thread_table
(
thd
,
ptr
);
if
(
*
ptr
&&
close_thread_table
(
thd
,
ptr
))
{
/* Tell threads waiting for refresh that something has happened */
VOID
(
pthread_cond_broadcast
(
&
COND_refresh
));
}
return
0
;
}
...
...
sql/sql_insert.cc
View file @
35c09b80
...
...
@@ -1438,6 +1438,15 @@ select_create::prepare(List<Item> &values)
if
(
!
table
)
DBUG_RETURN
(
-
1
);
// abort() deletes table
if
(
table
->
fields
<
values
.
elements
)
{
do_not_drop
=
1
;
my_printf_error
(
ER_WRONG_VALUE_COUNT_ON_ROW
,
ER
(
ER_WRONG_VALUE_COUNT_ON_ROW
),
MYF
(
0
),
1
);
DBUG_RETURN
(
-
1
);
}
/* First field to copy */
field
=
table
->
field
+
table
->
fields
-
values
.
elements
;
...
...
@@ -1519,6 +1528,7 @@ void select_create::abort()
enum
db_type
table_type
=
table
->
db_type
;
if
(
!
table
->
tmp_table
)
hash_delete
(
&
open_cache
,(
byte
*
)
table
);
if
(
!
do_not_drop
)
quick_rm_table
(
table_type
,
db
,
name
);
table
=
0
;
}
...
...
sql/sql_parse.cc
View file @
35c09b80
...
...
@@ -2693,7 +2693,7 @@ check_access(THD *thd, ulong want_access, const char *db, ulong *save_priv,
/* grant_option is set if there exists a single table or column grant */
if
(
db_access
==
want_access
||
((
grant_option
&&
!
dont_check_global_grants
)
&&
!
(
want_access
&
~
TABLE_ACLS
)))
!
(
want_access
&
~
(
db_access
|
TABLE_ACLS
)
)))
DBUG_RETURN
(
FALSE
);
/* Ok */
if
(
!
no_errors
)
net_printf
(
&
thd
->
net
,
ER_DBACCESS_DENIED_ERROR
,
...
...
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