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
eadb86d5
Commit
eadb86d5
authored
Aug 22, 2005
by
serg@sergbook.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
after pull cleanup
parent
d9e3ad09
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
44 additions
and
1050 deletions
+44
-1050
configure.in
configure.in
+1
-1
mysql-test/r/rpl_drop_db.result
mysql-test/r/rpl_drop_db.result
+17
-1017
mysql-test/t/rpl_drop_db.test
mysql-test/t/rpl_drop_db.test
+17
-14
sql/sql_db.cc
sql/sql_db.cc
+9
-12
sql/sql_table.cc
sql/sql_table.cc
+0
-3
sql/table.h
sql/table.h
+0
-3
No files found.
configure.in
View file @
eadb86d5
...
@@ -118,7 +118,7 @@ AC_SUBST(SAVE_LDFLAGS)
...
@@ -118,7 +118,7 @@ AC_SUBST(SAVE_LDFLAGS)
AC_SUBST
(
SAVE_CXXLDFLAGS
)
AC_SUBST
(
SAVE_CXXLDFLAGS
)
AC_SUBST
(
CXXLDFLAGS
)
AC_SUBST
(
CXXLDFLAGS
)
AC_PREREQ
(
2.5
7
)
dnl Minimum Autoconf version required.
AC_PREREQ
(
2.5
2
)
dnl Minimum Autoconf version required.
#AC_ARG_PROGRAM # Automaticly invoked by AM_INIT_AUTOMAKE
#AC_ARG_PROGRAM # Automaticly invoked by AM_INIT_AUTOMAKE
AM_SANITY_CHECK
AM_SANITY_CHECK
...
...
mysql-test/r/rpl_drop_db.result
View file @
eadb86d5
This diff is collapsed.
Click to expand it.
mysql-test/t/rpl_drop_db.test
View file @
eadb86d5
...
@@ -5,30 +5,33 @@
...
@@ -5,30 +5,33 @@
connection
master
;
connection
master
;
--
disable_warnings
--
disable_warnings
drop
database
if
exists
d
1
;
drop
database
if
exists
mysqltest
1
;
--
enable_warnings
--
enable_warnings
create
database
d
1
;
create
database
mysqltest
1
;
create
table
d
1
.
t1
(
n
int
);
create
table
mysqltest
1
.
t1
(
n
int
);
insert
into
d
1
.
t1
values
(
1
);
insert
into
mysqltest
1
.
t1
values
(
1
);
select
*
from
d1
.
t1
into
outfile
'd
1/f1.txt'
;
select
*
from
mysqltest1
.
t1
into
outfile
'mysqltest
1/f1.txt'
;
create
table
d
1
.
t2
(
n
int
);
create
table
mysqltest
1
.
t2
(
n
int
);
create
table
d
1
.
t3
(
n
int
);
create
table
mysqltest
1
.
t3
(
n
int
);
--
error
1010
--
error
1010
drop
database
d
1
;
drop
database
mysqltest
1
;
use
d
1
;
use
mysqltest
1
;
show
tables
;
show
tables
;
# test the branch of the code that deals with the query buffer overflow
# test the branch of the code that deals with the query buffer overflow
--
disable_query_log
let
$
1
=
1000
;
let
$
1
=
1000
;
while
(
$
1
)
while
(
$
1
)
{
{
eval
create
table
d
1
.
t
$
1
(
n
int
);
eval
create
table
mysqltest
1
.
t
$
1
(
n
int
);
dec
$
1
;
dec
$
1
;
}
}
--
enable_query_log
--
error
1010
--
error
1010
drop
database
d
1
;
drop
database
mysqltest
1
;
use
d
1
;
use
mysqltest
1
;
show
tables
;
show
tables
;
use
test
;
use
test
;
create
table
t1
(
n
int
);
create
table
t1
(
n
int
);
...
@@ -36,7 +39,7 @@ insert into t1 values (1234);
...
@@ -36,7 +39,7 @@ insert into t1 values (1234);
sync_slave_with_master
;
sync_slave_with_master
;
connection
slave
;
connection
slave
;
use
d
1
;
use
mysqltest
1
;
show
tables
;
show
tables
;
use
test
;
use
test
;
select
*
from
t1
;
select
*
from
t1
;
...
@@ -48,5 +51,5 @@ sync_slave_with_master;
...
@@ -48,5 +51,5 @@ sync_slave_with_master;
#cleanup
#cleanup
connection
slave
;
connection
slave
;
stop
slave
;
stop
slave
;
system
rm
-
rf
var
/
master
-
data
/
d
1
;
system
rm
-
rf
var
/
master
-
data
/
mysqltest
1
;
sql/sql_db.cc
View file @
eadb86d5
...
@@ -697,41 +697,38 @@ int mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent)
...
@@ -697,41 +697,38 @@ int mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent)
else
if
(
mysql_bin_log
.
is_open
())
else
if
(
mysql_bin_log
.
is_open
())
{
{
char
*
query
=
thd
->
alloc
(
MAX_DROP_TABLE_Q_LEN
);
char
*
query
=
thd
->
alloc
(
MAX_DROP_TABLE_Q_LEN
);
if
(
!
query
)
if
(
!
query
)
goto
exit
;
/* not much else we can do */
goto
exit
;
/* not much else we can do */
char
*
p
=
strmov
(
query
,
"drop table "
);
char
*
p
=
strmov
(
query
,
"drop table "
);
char
*
p_end
=
query
+
MAX_DROP_TABLE_Q_LEN
;
char
*
p_end
=
query
+
MAX_DROP_TABLE_Q_LEN
;
TABLE_LIST
*
tbl
;
TABLE_LIST
*
tbl
;
bool
last_query_needs_write
=
0
;
bool
last_query_needs_write
=
0
;
uint
db_len
=
strlen
(
db
);
uint
db_len
=
strlen
(
db
);
for
(
tbl
=
dropped_tables
;
tbl
;
tbl
=
tbl
->
next
)
for
(
tbl
=
dropped_tables
;
tbl
;
tbl
=
tbl
->
next
)
{
{
if
(
!
tbl
->
was_dropped
)
/* 3 for the quotes and the comma*/
continue
;
uint
tbl_name_len
=
strlen
(
tbl
->
real_name
)
+
3
;
/* 3 for the quotes and the comma*/
uint
tbl_name_len
=
strlen
(
tbl
->
real_name
)
+
3
;
if
(
p
+
tbl_name_len
+
1
>=
p_end
)
if
(
p
+
tbl_name_len
+
1
>=
p_end
)
{
{
*--
p
=
0
;
/* kill , */
*--
p
=
0
;
/* kill , */
write_to_binlog
(
thd
,
query
,
p
-
query
,
db
,
db_len
);
write_to_binlog
(
thd
,
query
,
p
-
query
,
db
,
db_len
);
p
=
query
+
11
;
/* reuse the initial "drop table" */
p
=
query
+
11
;
/* reuse the initial "drop table" */
}
}
*
p
++
=
'`'
;
*
p
++
=
'`'
;
p
=
strmov
(
p
,
tbl
->
real_name
);
p
=
strmov
(
p
,
tbl
->
real_name
);
*
p
++
=
'`'
;
*
p
++
=
'`'
;
*
p
++
=
','
;
*
p
++
=
','
;
last_query_needs_write
=
1
;
last_query_needs_write
=
1
;
}
}
if
(
last_query_needs_write
)
if
(
last_query_needs_write
)
{
{
*--
p
=
0
;
*--
p
=
0
;
write_to_binlog
(
thd
,
query
,
p
-
query
,
db
,
db_len
);
write_to_binlog
(
thd
,
query
,
p
-
query
,
db
,
db_len
);
}
}
}
}
exit:
exit:
...
...
sql/sql_table.cc
View file @
eadb86d5
...
@@ -220,7 +220,6 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
...
@@ -220,7 +220,6 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
for
(
table
=
tables
;
table
;
table
=
table
->
next
)
for
(
table
=
tables
;
table
;
table
=
table
->
next
)
{
{
char
*
db
=
table
->
db
;
char
*
db
=
table
->
db
;
table
->
was_dropped
=
0
;
mysql_ha_flush
(
thd
,
table
,
MYSQL_HA_CLOSE_FINAL
);
mysql_ha_flush
(
thd
,
table
,
MYSQL_HA_CLOSE_FINAL
);
if
(
!
close_temporary_table
(
thd
,
db
,
table
->
real_name
))
if
(
!
close_temporary_table
(
thd
,
db
,
table
->
real_name
))
{
{
...
@@ -281,8 +280,6 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
...
@@ -281,8 +280,6 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
wrong_tables
.
append
(
','
);
wrong_tables
.
append
(
','
);
wrong_tables
.
append
(
String
(
table
->
real_name
,
system_charset_info
));
wrong_tables
.
append
(
String
(
table
->
real_name
,
system_charset_info
));
}
}
else
table
->
was_dropped
=
1
;
}
}
thd
->
tmp_table_used
=
tmp_table_deleted
;
thd
->
tmp_table_used
=
tmp_table_deleted
;
error
=
0
;
error
=
0
;
...
...
sql/table.h
View file @
eadb86d5
...
@@ -235,9 +235,6 @@ typedef struct st_table_list
...
@@ -235,9 +235,6 @@ typedef struct st_table_list
bool
cacheable_table
;
/* stop PS caching */
bool
cacheable_table
;
/* stop PS caching */
/* used in multi-upd privelege check */
/* used in multi-upd privelege check */
bool
table_in_update_from_clause
;
bool
table_in_update_from_clause
;
/* used for proper partially successful DROP DATABASE binlogging */
bool
was_dropped
;
}
TABLE_LIST
;
}
TABLE_LIST
;
typedef
struct
st_changed_table_list
typedef
struct
st_changed_table_list
...
...
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