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
6edfba95
Commit
6edfba95
authored
Oct 06, 2009
by
Kristofer Pettersson
Browse files
Options
Browse Files
Download
Plain Diff
Automerge
parents
9098e299
379d1f19
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
129 additions
and
5 deletions
+129
-5
client/mysqltest.c
client/mysqltest.c
+11
-1
configure.in
configure.in
+2
-1
mysql-test/r/federated_debug.result
mysql-test/r/federated_debug.result
+37
-0
mysql-test/t/federated_debug-master.opt
mysql-test/t/federated_debug-master.opt
+1
-0
mysql-test/t/federated_debug.test
mysql-test/t/federated_debug.test
+39
-0
sql/slave.cc
sql/slave.cc
+1
-1
sql/sql_parse.cc
sql/sql_parse.cc
+23
-1
win/configure.js
win/configure.js
+15
-1
No files found.
client/mysqltest.c
View file @
6edfba95
...
...
@@ -6346,6 +6346,16 @@ void run_query_stmt(MYSQL *mysql, struct st_command *command,
*/
}
/*
Need to grab affected rows information before getting
warnings here
*/
ulonglong
affected_rows
;
LINT_INIT
(
affected_rows
);
if
(
!
disable_info
)
affected_rows
=
mysql_affected_rows
(
mysql
);
if
(
!
disable_warnings
)
{
/* Get the warnings from execute */
...
...
@@ -6370,7 +6380,7 @@ void run_query_stmt(MYSQL *mysql, struct st_command *command,
}
if
(
!
disable_info
)
append_info
(
ds
,
mysql_affected_rows
(
mysql
)
,
mysql_info
(
mysql
));
append_info
(
ds
,
affected_rows
,
mysql_info
(
mysql
));
}
...
...
configure.in
View file @
6edfba95
...
...
@@ -1779,13 +1779,14 @@ then
DEBUG_OPTIMIZE_CXX
=
"-O"
OPTIMIZE_CXXFLAGS
=
"
$MAX_CXX_OPTIMIZE
"
else
DEBUG_CXXFLAGS
=
"-g"
DEBUG_OPTIMIZE_CXX
=
""
case
$SYSTEM_TYPE
in
*
solaris
*
)
DEBUG_CXXFLAGS
=
"-g0"
OPTIMIZE_CXXFLAGS
=
"-O1"
;;
*
)
DEBUG_CXXFLAGS
=
"-g"
OPTIMIZE_CXXFLAGS
=
"-O"
;;
esac
...
...
mysql-test/r/federated_debug.result
0 → 100644
View file @
6edfba95
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
stop slave;
DROP DATABASE IF EXISTS federated;
CREATE DATABASE federated;
DROP DATABASE IF EXISTS federated;
CREATE DATABASE federated;
#
# Bug#47525: MySQL crashed (Federated)
#
# Switch to slave
CREATE TABLE t1(a INT);
INSERT INTO t1 VALUES (1);
# Switch to master
CREATE TABLE t1(a INT) ENGINE=FEDERATED
CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/test/t1';
SELECT * FROM t1;
a
1
# Start a asynchronous reload
# Wait for tables to be closed
# Ensure that the server didn't crash
SELECT * FROM t1;
a
1
# Drop tables on master and slave
DROP TABLE t1;
DROP TABLE t1;
# Federated cleanup
DROP TABLE IF EXISTS federated.t1;
DROP DATABASE IF EXISTS federated;
DROP TABLE IF EXISTS federated.t1;
DROP DATABASE IF EXISTS federated;
mysql-test/t/federated_debug-master.opt
0 → 100644
View file @
6edfba95
--loose-debug=d,simulate_detached_thread_refresh
mysql-test/t/federated_debug.test
0 → 100644
View file @
6edfba95
--
source
include
/
have_debug
.
inc
--
source
include
/
federated
.
inc
--
echo
#
--
echo
# Bug#47525: MySQL crashed (Federated)
--
echo
#
connection
slave
;
--
echo
# Switch to slave
CREATE
TABLE
t1
(
a
INT
);
INSERT
INTO
t1
VALUES
(
1
);
connection
master
;
--
echo
# Switch to master
--
replace_result
$SLAVE_MYPORT
SLAVE_PORT
eval
CREATE
TABLE
t1
(
a
INT
)
ENGINE
=
FEDERATED
CONNECTION
=
'mysql://root@127.0.0.1:$SLAVE_MYPORT/test/t1'
;
SELECT
*
FROM
t1
;
--
echo
# Start a asynchronous reload
--
exec
$MYSQLADMIN
--
no
-
defaults
-
S
$MASTER_MYSOCK
-
P
$MASTER_MYPORT
-
u
root
--
password
=
refresh
2
>&
1
--
echo
# Wait for tables to be closed
let
$show_statement
=
SHOW
STATUS
LIKE
'Open_tables'
;
let
$field
=
Value
;
let
$condition
=
=
'0'
;
--
source
include
/
wait_show_condition
.
inc
--
echo
# Ensure that the server didn't crash
SELECT
*
FROM
t1
;
--
echo
# Drop tables on master and slave
DROP
TABLE
t1
;
connection
slave
;
DROP
TABLE
t1
;
connection
default
;
--
echo
# Federated cleanup
source
include
/
federated_cleanup
.
inc
;
sql/slave.cc
View file @
6edfba95
...
...
@@ -4756,7 +4756,7 @@ extern "C" void slave_io_thread_detach_vio()
{
#ifdef SIGNAL_WITH_VIO_CLOSE
THD
*
thd
=
current_thd
;
if
(
thd
->
slave_thread
)
if
(
thd
&&
thd
->
slave_thread
)
thd
->
clear_active_vio
();
#endif
}
...
...
sql/sql_parse.cc
View file @
6edfba95
...
...
@@ -2161,7 +2161,28 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
if
(
check_global_access
(
thd
,
RELOAD_ACL
))
break
;
mysql_log
.
write
(
thd
,
command
,
NullS
);
if
(
!
reload_acl_and_cache
(
thd
,
options
,
(
TABLE_LIST
*
)
0
,
&
not_used
))
#ifndef DBUG_OFF
bool
debug_simulate
=
FALSE
;
DBUG_EXECUTE_IF
(
"simulate_detached_thread_refresh"
,
debug_simulate
=
TRUE
;);
if
(
debug_simulate
)
{
/*
Simulate a reload without a attached thread session.
Provides a environment similar to that of when the
server receives a SIGHUP signal and reloads caches
and flushes tables.
*/
bool
res
;
my_pthread_setspecific_ptr
(
THR_THD
,
NULL
);
res
=
reload_acl_and_cache
(
NULL
,
options
|
REFRESH_FAST
,
NULL
,
&
not_used
);
my_pthread_setspecific_ptr
(
THR_THD
,
thd
);
if
(
!
res
)
send_ok
(
thd
);
break
;
}
#endif
if
(
!
reload_acl_and_cache
(
thd
,
options
,
NULL
,
&
not_used
))
send_ok
(
thd
);
break
;
}
...
...
@@ -2298,6 +2319,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
my_message
(
ER_UNKNOWN_COM_ERROR
,
ER
(
ER_UNKNOWN_COM_ERROR
),
MYF
(
0
));
break
;
}
if
(
thd
->
lock
||
thd
->
open_tables
||
thd
->
derived_tables
||
thd
->
prelocked_mode
)
{
...
...
win/configure.js
View file @
6edfba95
...
...
@@ -41,7 +41,6 @@ try
{
case
"
WITH_COMMUNITY_FEATURES
"
:
case
"
WITH_ARCHIVE_STORAGE_ENGINE
"
:
case
"
WITH_BERKELEY_STORAGE_ENGINE
"
:
case
"
WITH_BLACKHOLE_STORAGE_ENGINE
"
:
case
"
WITH_EXAMPLE_STORAGE_ENGINE
"
:
case
"
WITH_FEDERATED_STORAGE_ENGINE
"
:
...
...
@@ -51,6 +50,21 @@ try
case
"
EMBED_MANIFESTS
"
:
configfile
.
WriteLine
(
"
SET (
"
+
args
.
Item
(
i
)
+
"
TRUE)
"
);
break
;
// BDB includes auto-generated files which are not handled by
// cmake, so only allow this option if building from a source
// distribution
case
"
WITH_BERKELEY_STORAGE_ENGINE
"
:
if
(
!
fso
.
FileExists
(
"
bdb
\\
btree
\\
btree_auto.c
"
))
{
BDBSourceError
=
new
Error
(
"
BDB cannot be built directly
"
+
"
from a bzr tree, see comment in bdb
\\
CMakeLists.txt
"
);
throw
BDBSourceError
;
}
else
{
configfile
.
WriteLine
(
"
SET (
"
+
args
.
Item
(
i
)
+
"
TRUE)
"
);
break
;
}
case
"
MYSQL_SERVER_SUFFIX
"
:
case
"
MYSQLD_EXE_SUFFIX
"
:
configfile
.
WriteLine
(
"
SET (
"
+
parts
[
0
]
+
"
\"
"
...
...
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