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
72cd3636
Commit
72cd3636
authored
Nov 26, 2007
by
tnurnberg@white.intern.koehntopp.de
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/misc/mysql/31752_/50-31752_
into mysql.com:/misc/mysql/31752_/51-31752_
parents
f1f9e231
883338a9
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
98 additions
and
17 deletions
+98
-17
client/mysql.cc
client/mysql.cc
+4
-1
mysql-test/r/bdb_notembedded.result
mysql-test/r/bdb_notembedded.result
+35
-0
mysql-test/t/bdb_notembedded.test
mysql-test/t/bdb_notembedded.test
+38
-0
sql/log.cc
sql/log.cc
+1
-1
sql/repl_failsafe.cc
sql/repl_failsafe.cc
+1
-1
sql/unireg.cc
sql/unireg.cc
+3
-0
strings/strmake.c
strings/strmake.c
+16
-14
No files found.
client/mysql.cc
View file @
72cd3636
...
@@ -3096,7 +3096,10 @@ com_connect(String *buffer, char *line)
...
@@ -3096,7 +3096,10 @@ com_connect(String *buffer, char *line)
Two null bytes are needed in the end of buff to allow
Two null bytes are needed in the end of buff to allow
get_arg to find end of string the second time it's called.
get_arg to find end of string the second time it's called.
*/
*/
strmake
(
buff
,
line
,
sizeof
(
buff
)
-
2
);
tmp
=
strmake
(
buff
,
line
,
sizeof
(
buff
)
-
2
);
#ifdef EXTRA_DEBUG
tmp
[
1
]
=
0
;
#endif
tmp
=
get_arg
(
buff
,
0
);
tmp
=
get_arg
(
buff
,
0
);
if
(
tmp
&&
*
tmp
)
if
(
tmp
&&
*
tmp
)
{
{
...
...
mysql-test/r/bdb_notembedded.result
0 → 100644
View file @
72cd3636
set autocommit=1;
reset master;
create table bug16206 (a int);
insert into bug16206 values(1);
start transaction;
insert into bug16206 values(2);
commit;
show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info
f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4
f n Query 1 n use `test`; create table bug16206 (a int)
f n Query 1 n use `test`; insert into bug16206 values(1)
f n Query 1 n use `test`; insert into bug16206 values(2)
drop table bug16206;
reset master;
create table bug16206 (a int) engine= bdb;
insert into bug16206 values(0);
insert into bug16206 values(1);
start transaction;
insert into bug16206 values(2);
commit;
insert into bug16206 values(3);
show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info
f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4
f n Query 1 n use `test`; create table bug16206 (a int) engine= bdb
f n Query 1 n use `test`; insert into bug16206 values(0)
f n Query 1 n use `test`; insert into bug16206 values(1)
f n Query 1 n use `test`; BEGIN
f n Query 1 n use `test`; insert into bug16206 values(2)
f n Query 1 n use `test`; COMMIT
f n Query 1 n use `test`; insert into bug16206 values(3)
drop table bug16206;
set autocommit=0;
End of 5.0 tests
mysql-test/t/bdb_notembedded.test
0 → 100644
View file @
72cd3636
--
source
include
/
not_embedded
.
inc
--
source
include
/
have_bdb
.
inc
#
# Bug #16206: Superfluous COMMIT event in binlog when updating BDB in autocommit mode
#
set
autocommit
=
1
;
let
$VERSION
=
`select version()`
;
reset
master
;
create
table
bug16206
(
a
int
);
insert
into
bug16206
values
(
1
);
start
transaction
;
insert
into
bug16206
values
(
2
);
commit
;
--
replace_result
$VERSION
VERSION
--
replace_column
1
f
2
n
5
n
show
binlog
events
;
drop
table
bug16206
;
reset
master
;
create
table
bug16206
(
a
int
)
engine
=
bdb
;
insert
into
bug16206
values
(
0
);
insert
into
bug16206
values
(
1
);
start
transaction
;
insert
into
bug16206
values
(
2
);
commit
;
insert
into
bug16206
values
(
3
);
--
replace_result
$VERSION
VERSION
--
replace_column
1
f
2
n
5
n
show
binlog
events
;
drop
table
bug16206
;
set
autocommit
=
0
;
--
echo
End
of
5.0
tests
sql/log.cc
View file @
72cd3636
...
@@ -3001,7 +3001,7 @@ void MYSQL_BIN_LOG::make_log_name(char* buf, const char* log_ident)
...
@@ -3001,7 +3001,7 @@ void MYSQL_BIN_LOG::make_log_name(char* buf, const char* log_ident)
if
(
dir_len
>
FN_REFLEN
)
if
(
dir_len
>
FN_REFLEN
)
dir_len
=
FN_REFLEN
-
1
;
dir_len
=
FN_REFLEN
-
1
;
strnmov
(
buf
,
log_file_name
,
dir_len
);
strnmov
(
buf
,
log_file_name
,
dir_len
);
strmake
(
buf
+
dir_len
,
log_ident
,
FN_REFLEN
-
dir_len
);
strmake
(
buf
+
dir_len
,
log_ident
,
FN_REFLEN
-
dir_len
-
1
);
}
}
...
...
sql/repl_failsafe.cc
View file @
72cd3636
...
@@ -925,7 +925,7 @@ bool load_master_data(THD* thd)
...
@@ -925,7 +925,7 @@ bool load_master_data(THD* thd)
0
,
(
SLAVE_IO
|
SLAVE_SQL
)))
0
,
(
SLAVE_IO
|
SLAVE_SQL
)))
my_message
(
ER_MASTER_INFO
,
ER
(
ER_MASTER_INFO
),
MYF
(
0
));
my_message
(
ER_MASTER_INFO
,
ER
(
ER_MASTER_INFO
),
MYF
(
0
));
strmake
(
active_mi
->
master_log_name
,
row
[
0
],
strmake
(
active_mi
->
master_log_name
,
row
[
0
],
sizeof
(
active_mi
->
master_log_name
));
sizeof
(
active_mi
->
master_log_name
)
-
1
);
active_mi
->
master_log_pos
=
my_strtoll10
(
row
[
1
],
(
char
**
)
0
,
&
error_2
);
active_mi
->
master_log_pos
=
my_strtoll10
(
row
[
1
],
(
char
**
)
0
,
&
error_2
);
/* at least in recent versions, the condition below should be false */
/* at least in recent versions, the condition below should be false */
if
(
active_mi
->
master_log_pos
<
BIN_LOG_HEADER_SIZE
)
if
(
active_mi
->
master_log_pos
<
BIN_LOG_HEADER_SIZE
)
...
...
sql/unireg.cc
View file @
72cd3636
...
@@ -227,6 +227,9 @@ bool mysql_create_frm(THD *thd, const char *file_name,
...
@@ -227,6 +227,9 @@ bool mysql_create_frm(THD *thd, const char *file_name,
strmake
((
char
*
)
forminfo
+
47
,
create_info
->
comment
.
str
?
strmake
((
char
*
)
forminfo
+
47
,
create_info
->
comment
.
str
?
create_info
->
comment
.
str
:
""
,
create_info
->
comment
.
length
);
create_info
->
comment
.
str
:
""
,
create_info
->
comment
.
length
);
forminfo
[
46
]
=
(
uchar
)
create_info
->
comment
.
length
;
forminfo
[
46
]
=
(
uchar
)
create_info
->
comment
.
length
;
#ifdef EXTRA_DEBUG
memset
((
char
*
)
forminfo
+
47
+
forminfo
[
46
],
0
,
61
-
forminfo
[
46
]);
#endif
#ifdef WITH_PARTITION_STORAGE_ENGINE
#ifdef WITH_PARTITION_STORAGE_ENGINE
if
(
part_info
)
if
(
part_info
)
{
{
...
...
strings/strmake.c
View file @
72cd3636
...
@@ -27,23 +27,25 @@
...
@@ -27,23 +27,25 @@
#include <my_global.h>
#include <my_global.h>
#include "m_string.h"
#include "m_string.h"
#ifdef BAD_STRING_COMPILER
char
*
strmake
(
register
char
*
dst
,
register
const
char
*
src
,
uint
length
)
char
*
strmake
(
char
*
dst
,
const
char
*
src
,
uint
length
)
{
{
reg1
char
*
res
;
#ifdef EXTRA_DEBUG
/*
if
((
res
=
memccpy
(
dst
,
src
,
0
,
length
)))
'length' is the maximum length of the string; the buffer needs
return
res
-
1
;
to be one character larger to accomodate the terminating '\0'.
dst
[
length
]
=
0
;
This is easy to get wrong, so we make sure we write to the
return
dst
+
length
;
entire length of the buffer to identify incorrect buffer-sizes.
}
We only initialise the "unused" part of the buffer here, a) for
efficiency, and b) because dst==src is allowed, so initialising
#define strmake strmake_overlapp
/* Use orginal for overlapping str */
the entire buffer would overwrite the source-string. Also, we
write a character rather than '\0' as this makes spotting these
problems in the results easier.
*/
uint
n
=
strlen
(
src
)
+
1
;
if
(
n
<=
length
)
memset
(
dst
+
n
,
(
int
)
'Z'
,
length
-
n
+
1
);
#endif
#endif
char
*
strmake
(
register
char
*
dst
,
register
const
char
*
src
,
size_t
length
)
{
while
(
length
--
)
while
(
length
--
)
if
(
!
(
*
dst
++
=
*
src
++
))
if
(
!
(
*
dst
++
=
*
src
++
))
return
dst
-
1
;
return
dst
-
1
;
...
...
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