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
819cc1ec
Commit
819cc1ec
authored
Jun 27, 2007
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge maint1.mysql.com:/data/localhome/tsmith/bk/51
into maint1.mysql.com:/data/localhome/tsmith/bk/maint/51
parents
a0fccef8
5a441ef8
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
278 additions
and
13 deletions
+278
-13
CMakeLists.txt
CMakeLists.txt
+1
-1
include/my_global.h
include/my_global.h
+6
-1
mysql-test/extra/binlog_tests/binlog.test
mysql-test/extra/binlog_tests/binlog.test
+92
-0
mysql-test/r/binlog_stm_binlog.result
mysql-test/r/binlog_stm_binlog.result
+117
-1
sql/log.cc
sql/log.cc
+58
-2
win/create_manifest.js
win/create_manifest.js
+3
-7
win/mysql_manifest.cmake
win/mysql_manifest.cmake
+1
-1
No files found.
CMakeLists.txt
View file @
819cc1ec
...
@@ -174,7 +174,7 @@ IF(EMBED_MANIFESTS)
...
@@ -174,7 +174,7 @@ IF(EMBED_MANIFESTS)
ENDIF
(
NOT tmp_manifest
)
ENDIF
(
NOT tmp_manifest
)
# Set the processor architecture.
# Set the processor architecture.
IF
(
CMAKE_GENERATOR MATCHES
"Visual Studio 8 2005 Win64"
)
IF
(
CMAKE_GENERATOR MATCHES
"Visual Studio 8 2005 Win64"
)
SET
(
PROCESSOR_ARCH
"
X
64"
)
SET
(
PROCESSOR_ARCH
"
amd
64"
)
ELSE
(
CMAKE_GENERATOR MATCHES
"Visual Studio 8 2005 Win64"
)
ELSE
(
CMAKE_GENERATOR MATCHES
"Visual Studio 8 2005 Win64"
)
SET
(
PROCESSOR_ARCH
"X86"
)
SET
(
PROCESSOR_ARCH
"X86"
)
ENDIF
(
CMAKE_GENERATOR MATCHES
"Visual Studio 8 2005 Win64"
)
ENDIF
(
CMAKE_GENERATOR MATCHES
"Visual Studio 8 2005 Win64"
)
...
...
include/my_global.h
View file @
819cc1ec
...
@@ -968,7 +968,12 @@ typedef unsigned long uint32;
...
@@ -968,7 +968,12 @@ typedef unsigned long uint32;
typedef
unsigned
long
ulong
;
/* Short for unsigned long */
typedef
unsigned
long
ulong
;
/* Short for unsigned long */
#endif
#endif
#ifndef longlong_defined
#ifndef longlong_defined
#if defined(HAVE_LONG_LONG) && SIZEOF_LONG != 8
/*
Using [unsigned] long long is preferable as [u]longlong because we use
[unsigned] long long unconditionally in many places,
for example in constants with [U]LL suffix.
*/
#if defined(HAVE_LONG_LONG) && SIZEOF_LONG_LONG == 8
typedef
unsigned
long
long
int
ulonglong
;
/* ulong or unsigned long long */
typedef
unsigned
long
long
int
ulonglong
;
/* ulong or unsigned long long */
typedef
long
long
int
longlong
;
typedef
long
long
int
longlong
;
#else
#else
...
...
mysql-test/extra/binlog_tests/binlog.test
View file @
819cc1ec
...
@@ -49,6 +49,98 @@ show binlog events in 'master-bin.000001' from 106;
...
@@ -49,6 +49,98 @@ show binlog events in 'master-bin.000001' from 106;
--
replace_regex
/
table_id
:
[
0
-
9
]
+/
table_id
:
#/ /\/\* xid=.* \*\//\/* xid= *\//
--
replace_regex
/
table_id
:
[
0
-
9
]
+/
table_id
:
#/ /\/\* xid=.* \*\//\/* xid= *\//
show
binlog
events
in
'master-bin.000002'
from
106
;
show
binlog
events
in
'master-bin.000002'
from
106
;
#
# Bug#22540 - Incorrect value in column End_log_pos of
# SHOW BINLOG EVENTS using InnoDB
#
# the following tests will show that certain queries now return
# absolute offsets (from binlog start, rather than relative to
# the beginning of the current transaction). under what
# conditions it should be allowed / is sensible to put the
# slider into the middle of a transaction is not our concern
# here; we just guarantee that if and when it's done, the
# user has valid offsets to use. if the setter function still
# wants to throw a "positioning into middle of transaction"
# warning, that's its prerogative and handled elsewhere.
set
@
ac
=
@@
autocommit
;
# first show this to work for SHOW BINLOG EVENTS
set
autocommit
=
0
;
reset
master
;
create
table
t1
(
n
int
)
engine
=
innodb
;
begin
;
insert
into
t1
values
(
1
);
insert
into
t1
values
(
2
);
insert
into
t1
values
(
3
);
commit
;
drop
table
t1
;
--
replace_regex
/
\
/
\
*
xid
=.*
\
*
\
//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/
show
binlog
events
from
0
;
set
autocommit
=
1
;
reset
master
;
create
table
t1
(
n
int
)
engine
=
innodb
;
insert
into
t1
values
(
1
);
insert
into
t1
values
(
2
);
insert
into
t1
values
(
3
);
commit
;
drop
table
t1
;
--
replace_regex
/
\
/
\
*
xid
=.*
\
*
\
//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/
show
binlog
events
from
0
;
reset
master
;
create
table
t1
(
n
int
)
engine
=
myisam
;
begin
;
insert
into
t1
values
(
4
);
insert
into
t1
values
(
5
);
insert
into
t1
values
(
6
);
commit
;
drop
table
t1
;
--
replace_regex
/
\
/
\
*
xid
=.*
\
*
\
//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/
show
binlog
events
from
0
;
# now show this also works for SHOW MASTER STATUS
# as this is what "mysqldump --master-data=1" uses.
set
autocommit
=
1
;
reset
master
;
create
table
t1
(
n
int
)
engine
=
innodb
;
show
master
status
;
insert
into
t1
values
(
1
);
show
master
status
;
insert
into
t1
values
(
2
);
insert
into
t1
values
(
3
);
show
master
status
;
commit
;
show
master
status
;
drop
table
t1
;
--
replace_regex
/
\
/
\
*
xid
=.*
\
*
\
//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/
show
binlog
events
from
0
;
set
autocommit
=
0
;
reset
master
;
create
table
t1
(
n
int
)
engine
=
myisam
;
show
master
status
;
insert
into
t1
values
(
4
);
show
master
status
;
insert
into
t1
values
(
5
);
insert
into
t1
values
(
6
);
show
master
status
;
commit
;
show
master
status
;
drop
table
t1
;
--
replace_regex
/
\
/
\
*
xid
=.*
\
*
\
//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/
show
binlog
events
from
0
;
set
session
autocommit
=
@
ac
;
--
echo
End
of
5.0
tests
# Test of a too big SET INSERT_ID: see if the truncated value goes
# Test of a too big SET INSERT_ID: see if the truncated value goes
# into binlog (right), or the too big value (wrong); we look at the
# into binlog (right), or the too big value (wrong); we look at the
# binlog further down with SHOW BINLOG EVENTS.
# binlog further down with SHOW BINLOG EVENTS.
...
...
mysql-test/r/binlog_stm_binlog.result
View file @
819cc1ec
...
@@ -7,7 +7,7 @@ Log_name Pos Event_type Server_id End_log_pos Info
...
@@ -7,7 +7,7 @@ Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 106 Server ver: #, Binlog ver: #
master-bin.000001 4 Format_desc 1 106 Server ver: #, Binlog ver: #
master-bin.000001 106 Query 1 213 use `test`; create table t1 (a int, b int) engine=innodb
master-bin.000001 106 Query 1 213 use `test`; create table t1 (a int, b int) engine=innodb
master-bin.000001 213 Query 1 281 use `test`; BEGIN
master-bin.000001 213 Query 1 281 use `test`; BEGIN
master-bin.000001 281 Query 1
90
use `test`; insert into t1 values (1,2)
master-bin.000001 281 Query 1
371
use `test`; insert into t1 values (1,2)
master-bin.000001 371 Xid 1 398 COMMIT /* XID */
master-bin.000001 371 Xid 1 398 COMMIT /* XID */
drop table t1;
drop table t1;
drop table if exists t1, t2;
drop table if exists t1, t2;
...
@@ -145,6 +145,122 @@ master-bin.000001 # Rotate 1 # master-bin.000002;pos=4
...
@@ -145,6 +145,122 @@ master-bin.000001 # Rotate 1 # master-bin.000002;pos=4
show binlog events in 'master-bin.000002' from 106;
show binlog events in 'master-bin.000002' from 106;
Log_name Pos Event_type Server_id End_log_pos Info
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000002 # Query 1 # use `test`; drop table t1
master-bin.000002 # Query 1 # use `test`; drop table t1
set @ac = @@autocommit;
set autocommit= 0;
reset master;
create table t1(n int) engine=innodb;
begin;
insert into t1 values (1);
insert into t1 values (2);
insert into t1 values (3);
commit;
drop table t1;
show binlog events from 0;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4
master-bin.000001 106 Query 1 205 use `test`; create table t1(n int) engine=innodb
master-bin.000001 205 Query 1 273 use `test`; BEGIN
master-bin.000001 273 Query 1 361 use `test`; insert into t1 values (1)
master-bin.000001 361 Query 1 449 use `test`; insert into t1 values (2)
master-bin.000001 449 Query 1 537 use `test`; insert into t1 values (3)
master-bin.000001 537 Xid 1 564 COMMIT /* XID */
master-bin.000001 564 Query 1 640 use `test`; drop table t1
set autocommit= 1;
reset master;
create table t1(n int) engine=innodb;
insert into t1 values (1);
insert into t1 values (2);
insert into t1 values (3);
commit;
drop table t1;
show binlog events from 0;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4
master-bin.000001 106 Query 1 205 use `test`; create table t1(n int) engine=innodb
master-bin.000001 205 Query 1 293 use `test`; insert into t1 values (1)
master-bin.000001 293 Xid 1 320 COMMIT /* XID */
master-bin.000001 320 Query 1 408 use `test`; insert into t1 values (2)
master-bin.000001 408 Xid 1 435 COMMIT /* XID */
master-bin.000001 435 Query 1 523 use `test`; insert into t1 values (3)
master-bin.000001 523 Xid 1 550 COMMIT /* XID */
master-bin.000001 550 Query 1 626 use `test`; drop table t1
reset master;
create table t1(n int) engine=myisam;
begin;
insert into t1 values (4);
insert into t1 values (5);
insert into t1 values (6);
commit;
drop table t1;
show binlog events from 0;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4
master-bin.000001 106 Query 1 205 use `test`; create table t1(n int) engine=myisam
master-bin.000001 205 Query 1 293 use `test`; insert into t1 values (4)
master-bin.000001 293 Query 1 381 use `test`; insert into t1 values (5)
master-bin.000001 381 Query 1 469 use `test`; insert into t1 values (6)
master-bin.000001 469 Query 1 545 use `test`; drop table t1
set autocommit= 1;
reset master;
create table t1(n int) engine=innodb;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 205
insert into t1 values (1);
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 320
insert into t1 values (2);
insert into t1 values (3);
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 550
commit;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 550
drop table t1;
show binlog events from 0;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4
master-bin.000001 106 Query 1 205 use `test`; create table t1(n int) engine=innodb
master-bin.000001 205 Query 1 293 use `test`; insert into t1 values (1)
master-bin.000001 293 Xid 1 320 COMMIT /* XID */
master-bin.000001 320 Query 1 408 use `test`; insert into t1 values (2)
master-bin.000001 408 Xid 1 435 COMMIT /* XID */
master-bin.000001 435 Query 1 523 use `test`; insert into t1 values (3)
master-bin.000001 523 Xid 1 550 COMMIT /* XID */
master-bin.000001 550 Query 1 626 use `test`; drop table t1
set autocommit= 0;
reset master;
create table t1(n int) engine=myisam;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 205
insert into t1 values (4);
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 293
insert into t1 values (5);
insert into t1 values (6);
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 469
commit;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 469
drop table t1;
show binlog events from 0;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4
master-bin.000001 106 Query 1 205 use `test`; create table t1(n int) engine=myisam
master-bin.000001 205 Query 1 293 use `test`; insert into t1 values (4)
master-bin.000001 293 Query 1 381 use `test`; insert into t1 values (5)
master-bin.000001 381 Query 1 469 use `test`; insert into t1 values (6)
master-bin.000001 469 Query 1 545 use `test`; drop table t1
set session autocommit = @ac;
End of 5.0 tests
reset master;
reset master;
create table t1 (id tinyint auto_increment primary key);
create table t1 (id tinyint auto_increment primary key);
set insert_id=128;
set insert_id=128;
...
...
sql/log.cc
View file @
819cc1ec
...
@@ -3945,9 +3945,65 @@ int MYSQL_BIN_LOG::write_cache(IO_CACHE *cache, bool lock_log, bool sync_log)
...
@@ -3945,9 +3945,65 @@ int MYSQL_BIN_LOG::write_cache(IO_CACHE *cache, bool lock_log, bool sync_log)
if
(
reinit_io_cache
(
cache
,
READ_CACHE
,
0
,
0
,
0
))
if
(
reinit_io_cache
(
cache
,
READ_CACHE
,
0
,
0
,
0
))
return
ER_ERROR_ON_WRITE
;
return
ER_ERROR_ON_WRITE
;
uint
bytes
=
my_b_bytes_in_cache
(
cache
);
uint
bytes
=
my_b_bytes_in_cache
(
cache
),
group
,
carry
,
hdr_offs
;
long
val
;
uchar
header
[
LOG_EVENT_HEADER_LEN
];
group
=
my_b_tell
(
&
log_file
);
hdr_offs
=
carry
=
0
;
do
do
{
{
if
(
likely
(
carry
>
0
))
{
DBUG_ASSERT
(
carry
<
LOG_EVENT_HEADER_LEN
);
memcpy
(
&
header
[
carry
],
(
char
*
)
cache
->
read_pos
,
LOG_EVENT_HEADER_LEN
-
carry
);
val
=
uint4korr
(
&
header
[
LOG_POS_OFFSET
])
+
group
;
int4store
(
&
header
[
LOG_POS_OFFSET
],
val
);
if
(
my_b_write
(
&
log_file
,
header
,
carry
))
return
ER_ERROR_ON_WRITE
;
memcpy
((
char
*
)
cache
->
read_pos
,
&
header
[
carry
],
LOG_EVENT_HEADER_LEN
-
carry
);
hdr_offs
=
LOG_EVENT_HEADER_LEN
-
carry
+
uint4korr
(
&
header
[
EVENT_LEN_OFFSET
]);
carry
=
0
;
}
if
(
likely
(
bytes
>
0
))
{
do
{
DBUG_ASSERT
((
hdr_offs
+
max
(
EVENT_LEN_OFFSET
,
LOG_POS_OFFSET
)
+
4
)
<=
bytes
);
val
=
uint4korr
((
char
*
)
cache
->
read_pos
+
hdr_offs
+
LOG_POS_OFFSET
)
+
group
;
int4store
((
char
*
)
cache
->
read_pos
+
hdr_offs
+
LOG_POS_OFFSET
,
val
);
hdr_offs
+=
uint4korr
((
char
*
)
cache
->
read_pos
+
hdr_offs
+
EVENT_LEN_OFFSET
);
/* header beyond current read-buffer? */
if
(
hdr_offs
>=
bytes
)
{
hdr_offs
-=
bytes
;
break
;
}
/* split header? */
if
(
hdr_offs
+
LOG_EVENT_HEADER_LEN
>
bytes
)
{
carry
=
bytes
-
hdr_offs
;
memcpy
(
header
,
(
char
*
)
cache
->
read_pos
+
hdr_offs
,
carry
);
bytes
-=
carry
;
}
}
while
(
hdr_offs
<
bytes
);
}
/* Write data to the binary log file */
if
(
my_b_write
(
&
log_file
,
cache
->
read_pos
,
bytes
))
if
(
my_b_write
(
&
log_file
,
cache
->
read_pos
,
bytes
))
return
ER_ERROR_ON_WRITE
;
return
ER_ERROR_ON_WRITE
;
cache
->
read_pos
=
cache
->
read_end
;
cache
->
read_pos
=
cache
->
read_end
;
...
...
win/create_manifest.js
View file @
819cc1ec
/*
/*
manifest.js - Writes a custom XML manifest for each executable/library
manifest.js - Writes a custom XML manifest for each executable/library
6
command line options must be supplied:
5
command line options must be supplied:
name - Name of the executable/library into which the mainfest will be
name - Name of the executable/library into which the mainfest will be
embedded.
embedded.
version - Version of the executable
version - Version of the executable
arch - Architecture intended.
arch - Architecture intended.
type - Application type.
exe_level - Application execution level.
exe_level - Application execution level.
[asInvoker|highestAvailable|requireAdministrator]
[asInvoker|highestAvailable|requireAdministrator]
outfile - Final destination where mainfest will be written.
outfile - Final destination where mainfest will be written.
...
@@ -37,9 +36,6 @@ try
...
@@ -37,9 +36,6 @@ try
case
"
arch
"
:
case
"
arch
"
:
var
app_arch
=
parts
[
1
];
var
app_arch
=
parts
[
1
];
break
;
break
;
case
"
type
"
:
var
app_type
=
parts
[
1
];
break
;
case
"
exe_level
"
:
case
"
exe_level
"
:
var
app_exe_level
=
parts
[
1
];
var
app_exe_level
=
parts
[
1
];
break
;
break
;
...
@@ -50,7 +46,7 @@ try
...
@@ -50,7 +46,7 @@ try
WScript
.
echo
(
"
Invalid argument supplied.
"
);
WScript
.
echo
(
"
Invalid argument supplied.
"
);
}
}
}
}
if
(
i
!=
6
)
if
(
i
!=
5
)
throw
new
Error
(
1
,
"
Incorrect number of arguments.
"
);
throw
new
Error
(
1
,
"
Incorrect number of arguments.
"
);
var
manifest_xml
=
"
<?xml version=
\
'1.0
\
' encoding=
\
'UTF-8
\
' standalone=
\
'yes
\
'?>
\r\n
"
;
var
manifest_xml
=
"
<?xml version=
\
'1.0
\
' encoding=
\
'UTF-8
\
' standalone=
\
'yes
\
'?>
\r\n
"
;
...
@@ -61,7 +57,7 @@ try
...
@@ -61,7 +57,7 @@ try
manifest_xml
+=
"
version=
\
'
"
+
app_version
+
"
\
'
"
;
manifest_xml
+=
"
version=
\
'
"
+
app_version
+
"
\
'
"
;
manifest_xml
+=
"
processorArchitecture=
\
'
"
+
app_arch
+
"
\
'
"
;
manifest_xml
+=
"
processorArchitecture=
\
'
"
+
app_arch
+
"
\
'
"
;
// TOADD - Add publicKeyToken attribute once we have Authenticode key.
// TOADD - Add publicKeyToken attribute once we have Authenticode key.
manifest_xml
+=
"
type=
\
'
"
+
app_type
+
"
\
' />
\r\n
"
;
manifest_xml
+=
"
type=
\
'
win32
\
' />
\r\n
"
;
// Identify the application security requirements.
// Identify the application security requirements.
manifest_xml
+=
"
\t
<trustInfo xmlns=
\
'urn:schemas-microsoft-com:asm.v2
\
'>
\r\n
"
;
manifest_xml
+=
"
\t
<trustInfo xmlns=
\
'urn:schemas-microsoft-com:asm.v2
\
'>
\r\n
"
;
manifest_xml
+=
"
\t\t
<security>
\r\n\t\t\t
<requestedPrivileges>
\r\n\t\t\t\t
"
;
manifest_xml
+=
"
\t\t
<security>
\r\n\t\t\t
<requestedPrivileges>
\r\n\t\t\t\t
"
;
...
...
win/mysql_manifest.cmake
View file @
819cc1ec
...
@@ -9,7 +9,7 @@ MACRO(MYSQL_EMBED_MANIFEST _target_name _required_privs)
...
@@ -9,7 +9,7 @@ MACRO(MYSQL_EMBED_MANIFEST _target_name _required_privs)
TARGET
${
_target_name
}
TARGET
${
_target_name
}
PRE_LINK
PRE_LINK
COMMAND cscript.exe
COMMAND cscript.exe
ARGS
"
${
PROJECT_SOURCE_DIR
}
/win/create_manifest.js"
name=$
(
ProjectName
)
version=
${
VERSION
}
arch=
${
PROCESSOR_ARCH
}
type=$
(
PlatformName
)
exe_level=
${
_required_privs
}
outfile=$
(
IntDir
)
\\$
(
TargetFileName
)
.intermediate.manifest
ARGS
"
${
PROJECT_SOURCE_DIR
}
/win/create_manifest.js"
name=$
(
ProjectName
)
version=
${
VERSION
}
arch=
${
PROCESSOR_ARCH
}
exe_level=
${
_required_privs
}
outfile=$
(
IntDir
)
\\$
(
TargetFileName
)
.intermediate.manifest
COMMENT
"Generates the contents of the manifest contents."
)
COMMENT
"Generates the contents of the manifest contents."
)
ADD_CUSTOM_COMMAND
(
ADD_CUSTOM_COMMAND
(
TARGET
${
_target_name
}
TARGET
${
_target_name
}
...
...
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