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
aa47bfa9
Commit
aa47bfa9
authored
May 11, 2006
by
mats@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysqldev@production.mysql.com:my/mysql-5.1-release
into mysql.com:/home/bk/b17400-mysql-5.1-new
parents
91653341
1c419c86
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
108 additions
and
94 deletions
+108
-94
mysql-test/r/rpl_bit_npk.result
mysql-test/r/rpl_bit_npk.result
+36
-32
mysql-test/t/disabled.def
mysql-test/t/disabled.def
+2
-2
mysql-test/t/rpl_bit_npk.test
mysql-test/t/rpl_bit_npk.test
+16
-12
mysql-test/t/rpl_ndb_innodb2ndb-slave.opt
mysql-test/t/rpl_ndb_innodb2ndb-slave.opt
+1
-1
mysql-test/t/rpl_ndb_myisam2ndb-slave.opt
mysql-test/t/rpl_ndb_myisam2ndb-slave.opt
+1
-1
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+18
-8
sql/log_event.cc
sql/log_event.cc
+34
-38
No files found.
mysql-test/r/rpl_bit_npk.result
View file @
aa47bfa9
...
...
@@ -56,86 +56,90 @@ INSERT INTO test.t1 VALUES (8,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,4
UNLOCK TABLES;
UPDATE test.t1 set x034 = 50 where bit3 = b'000000';
UPDATE test.t1 set VNotSupp = 33 where bit1 = b'0';
SELECT oSupp, sSuppD, GSuppDf, VNotSupp, x034 FROM test.t1;
SELECT oSupp, sSuppD, GSuppDf, VNotSupp, x034
FROM test.t1
ORDER BY oSupp, sSuppD, GSuppDf, VNotSupp, x034;
oSupp sSuppD GSuppDf VNotSupp x034
5 5 3 NULL 1
5 5 3 2 1
5 5 3 33 1
5 5 3 2 50
5 5 3 33 1
5 5 3 33 1
5 5 3 33 1
5 5 3 33 1
SELECT hex(bit1) from test.t1;
5 5 3 33 1
SELECT hex(bit1) from test.t1 ORDER BY bit1;
hex(bit1)
3F
3F
0
2A
0
0
0
0
SELECT hex(bit2) from test.t1;
hex(bit2)
3E
0
2A
3F
3F
SELECT hex(bit2) from test.t1 ORDER BY bit2;
hex(bit2)
0
1
1
1
1
SELECT hex(bit3) from test.t1;
2A
3E
3F
SELECT hex(bit3) from test.t1 ORDER BY bit3;
hex(bit3)
35
24
15
0
1
1
1
1
SELECT oSupp, sSuppD, GSuppDf, VNotSupp, x034 FROM test.t1;
15
24
35
SELECT oSupp, sSuppD, GSuppDf, VNotSupp, x034
FROM test.t1
ORDER BY oSupp, sSuppD, GSuppDf, VNotSupp, x034;
oSupp sSuppD GSuppDf VNotSupp x034
5 5 3 NULL 1
5 5 3 2 1
5 5 3 33 1
5 5 3 2 50
5 5 3 33 1
5 5 3 33 1
5 5 3 33 1
5 5 3 33 1
SELECT hex(bit1) from test.t1;
5 5 3 33 1
SELECT hex(bit1) from test.t1 ORDER BY bit1;
hex(bit1)
3F
3F
0
2A
0
0
0
0
SELECT hex(bit2) from test.t1;
hex(bit2)
3E
0
2A
3F
3F
SELECT hex(bit2) from test.t1 ORDER BY bit2;
hex(bit2)
0
1
1
1
1
SELECT hex(bit3) from test.t1;
2A
3E
3F
SELECT hex(bit3) from test.t1 ORDER BY bit3;
hex(bit3)
35
24
15
0
1
1
1
1
15
24
35
CREATE TABLE test.t2 (a INT, b BIT(1));
INSERT INTO test.t2 VALUES (1, b'0');
INSERT INTO test.t2 VALUES (1, b'1');
...
...
@@ -144,19 +148,19 @@ CREATE TABLE test.t3 (a INT, b INT);
INSERT INTO test.t3 VALUES (1, NULL);
INSERT INTO test.t3 VALUES (1, 0);
UPDATE test.t3 SET a = 2 WHERE b = 0;
SELECT a, hex(b) FROM test.t2;
SELECT a, hex(b) FROM test.t2
ORDER BY a,b
;
a hex(b)
1 0
2 1
SELECT * FROM test.t3;
SELECT * FROM test.t3
ORDER BY a,b
;
a b
1 NULL
2 0
SELECT a, hex(b) FROM test.t2;
SELECT a, hex(b) FROM test.t2
ORDER BY a,b
;
a hex(b)
1 0
2 1
SELECT * FROM test.t3;
SELECT * FROM test.t3
ORDER BY a,b
;
a b
1 NULL
2 0
...
...
mysql-test/t/disabled.def
View file @
aa47bfa9
...
...
@@ -27,9 +27,9 @@ rpl_ndb_auto_inc : BUG#17086 2006-02-16 jmiller CR: auto_increment_incre
rpl_ndb_commit_afterflush : BUG#19328 2006-05-04 tomas Slave timeout with COM_REGISTER_SLAVE error causing stop
rpl_ndb_dd_partitions : BUG#19259 2006-04-21 rpl_ndb_dd_partitions fails on s/AMD
rpl_ndb_ddl : BUG#18946 result file needs update + test needs to checked
rpl_ndb_innodb2ndb : B
UG#17400 2006-04-19 tomas Cluster Replication: delete & update of rows in table without pk fails on slave.
rpl_ndb_innodb2ndb : B
ug #19710 Cluster replication to partition table fails on DELETE FROM statement
rpl_ndb_log : BUG#18947 2006-03-21 tomas CRBR: order in binlog of create table and insert (on different table) not determ
rpl_ndb_myisam2ndb : B
UG#17400 2006-04-19 tomas Cluster Replication: delete & update of rows in table without pk fails on slave.
rpl_ndb_myisam2ndb : B
ug #19710 Cluster replication to partition table fails on DELETE FROM statement
rpl_switch_stm_row_mixed : BUG#18590 2006-03-28 brian
rpl_row_blob_innodb : BUG#18980 2006-04-10 kent Test fails randomly
rpl_row_func003 : BUG#19074 2006-13-04 andrei test failed
...
...
mysql-test/t/rpl_bit_npk.test
View file @
aa47bfa9
...
...
@@ -70,18 +70,22 @@ UNLOCK TABLES;
UPDATE
test
.
t1
set
x034
=
50
where
bit3
=
b
'000000'
;
UPDATE
test
.
t1
set
VNotSupp
=
33
where
bit1
=
b
'0'
;
SELECT
oSupp
,
sSuppD
,
GSuppDf
,
VNotSupp
,
x034
FROM
test
.
t1
;
SELECT
hex
(
bit1
)
from
test
.
t1
;
SELECT
hex
(
bit2
)
from
test
.
t1
;
SELECT
hex
(
bit3
)
from
test
.
t1
;
SELECT
oSupp
,
sSuppD
,
GSuppDf
,
VNotSupp
,
x034
FROM
test
.
t1
ORDER
BY
oSupp
,
sSuppD
,
GSuppDf
,
VNotSupp
,
x034
;
SELECT
hex
(
bit1
)
from
test
.
t1
ORDER
BY
bit1
;
SELECT
hex
(
bit2
)
from
test
.
t1
ORDER
BY
bit2
;
SELECT
hex
(
bit3
)
from
test
.
t1
ORDER
BY
bit3
;
save_master_pos
;
connection
slave
;
sync_with_master
;
SELECT
oSupp
,
sSuppD
,
GSuppDf
,
VNotSupp
,
x034
FROM
test
.
t1
;
SELECT
hex
(
bit1
)
from
test
.
t1
;
SELECT
hex
(
bit2
)
from
test
.
t1
;
SELECT
hex
(
bit3
)
from
test
.
t1
;
SELECT
oSupp
,
sSuppD
,
GSuppDf
,
VNotSupp
,
x034
FROM
test
.
t1
ORDER
BY
oSupp
,
sSuppD
,
GSuppDf
,
VNotSupp
,
x034
;
SELECT
hex
(
bit1
)
from
test
.
t1
ORDER
BY
bit1
;
SELECT
hex
(
bit2
)
from
test
.
t1
ORDER
BY
bit2
;
SELECT
hex
(
bit3
)
from
test
.
t1
ORDER
BY
bit3
;
connection
master
;
CREATE
TABLE
test
.
t2
(
a
INT
,
b
BIT
(
1
));
...
...
@@ -94,14 +98,14 @@ INSERT INTO test.t3 VALUES (1, NULL);
INSERT
INTO
test
.
t3
VALUES
(
1
,
0
);
UPDATE
test
.
t3
SET
a
=
2
WHERE
b
=
0
;
SELECT
a
,
hex
(
b
)
FROM
test
.
t2
;
SELECT
*
FROM
test
.
t3
;
SELECT
a
,
hex
(
b
)
FROM
test
.
t2
ORDER
BY
a
,
b
;
SELECT
*
FROM
test
.
t3
ORDER
BY
a
,
b
;
save_master_pos
;
connection
slave
;
sync_with_master
;
SELECT
a
,
hex
(
b
)
FROM
test
.
t2
;
SELECT
*
FROM
test
.
t3
;
SELECT
a
,
hex
(
b
)
FROM
test
.
t2
ORDER
BY
a
,
b
;
SELECT
*
FROM
test
.
t3
ORDER
BY
a
,
b
;
connection
master
;
DROP
TABLE
IF
EXISTS
test
.
t1
;
...
...
mysql-test/t/rpl_ndb_innodb2ndb-slave.opt
View file @
aa47bfa9
--binlog-format=row --default-storage-engine=ndb
--binlog-format=row --default-storage-engine=ndb
cluster
mysql-test/t/rpl_ndb_myisam2ndb-slave.opt
View file @
aa47bfa9
--default-storage-engine=ndb --binlog-format=row
--default-storage-engine=ndb
cluster
--binlog-format=row
sql/ha_ndbcluster.cc
View file @
aa47bfa9
...
...
@@ -2875,7 +2875,7 @@ void ndb_unpack_record(TABLE *table, NdbValue *value,
MY_BITMAP
*
defined
,
byte
*
buf
)
{
Field
**
p_field
=
table
->
field
,
*
field
=
*
p_field
;
uint
row_offset
=
(
uint
)
(
buf
-
table
->
record
[
0
])
;
my_ptrdiff_t
row_offset
=
buf
-
table
->
record
[
0
]
;
DBUG_ENTER
(
"ndb_unpack_record"
);
// Set null flag(s)
...
...
@@ -2906,24 +2906,34 @@ void ndb_unpack_record(TABLE *table, NdbValue *value,
}
else
if
(
field
->
type
()
==
MYSQL_TYPE_BIT
)
{
byte
*
save_field_ptr
=
field
->
ptr
;
field
->
ptr
=
save_field_ptr
+
row_offset
;
Field_bit
*
field_bit
=
static_cast
<
Field_bit
*>
(
field
);
/*
Move internal field pointer to point to 'buf'. Calling
the correct member function directly since we know the
type of the object.
*/
field_bit
->
Field_bit
::
move_field_offset
(
row_offset
);
if
(
field
->
pack_length
()
<
5
)
{
DBUG_PRINT
(
"info"
,
(
"bit field H'%.8X"
,
(
*
value
).
rec
->
u_32_value
()));
((
Field_bit
*
)
field
)
->
store
((
longlong
)
(
*
value
).
rec
->
u_32_value
(),
FALSE
);
field_bit
->
Field_bit
::
store
((
longlong
)
(
*
value
).
rec
->
u_32_value
(),
FALSE
);
}
else
{
DBUG_PRINT
(
"info"
,
(
"bit field H'%.8X%.8X"
,
*
(
Uint32
*
)
(
*
value
).
rec
->
aRef
(),
*
((
Uint32
*
)
(
*
value
).
rec
->
aRef
()
+
1
)));
((
Field_bit
*
)
field
)
->
store
((
longlong
)
(
*
value
).
rec
->
u_64_value
(),
TRUE
);
field_bit
->
Field_bit
::
store
((
longlong
)
(
*
value
).
rec
->
u_64_value
(),
TRUE
);
}
field
->
ptr
=
save_field_ptr
;
/*
Move back internal field pointer to point to original
value (usually record[0]).
*/
field_bit
->
Field_bit
::
move_field_offset
(
-
row_offset
);
DBUG_PRINT
(
"info"
,(
"[%u] SET"
,
(
*
value
).
rec
->
getColumn
()
->
getColumnNo
()));
DBUG_DUMP
(
"info"
,
(
const
char
*
)
field
->
ptr
,
field
->
field_length
);
...
...
sql/log_event.cc
View file @
aa47bfa9
...
...
@@ -6416,12 +6416,17 @@ static int find_and_fetch_row(TABLE *table, byte *key)
if
(
table
->
s
->
keys
>
0
)
{
int
error
;
/*
We need to set the null bytes to ensure that the filler bit
are all set when returning. There are storage engines that
just set the necessary bits on the bytes and don't set the
filler bits correctly.
*/
/* We have a key: search the table using the index */
if
(
!
table
->
file
->
inited
)
if
((
error
=
table
->
file
->
ha_index_init
(
0
,
FALSE
)))
return
error
;
/*
We need to set the null bytes to ensure that the filler bit are
all set when returning. There are storage engines that just set
the necessary bits on the bytes and don't set the filler bits
correctly.
*/
my_ptrdiff_t
const
pos
=
table
->
s
->
null_bytes
>
0
?
table
->
s
->
null_bytes
-
1
:
0
;
table
->
record
[
1
][
pos
]
=
0xFF
;
...
...
@@ -6430,6 +6435,7 @@ static int find_and_fetch_row(TABLE *table, byte *key)
HA_READ_KEY_EXACT
)))
{
table
->
file
->
print_error
(
error
,
MYF
(
0
));
table
->
file
->
ha_index_end
();
DBUG_RETURN
(
error
);
}
...
...
@@ -6448,7 +6454,10 @@ static int find_and_fetch_row(TABLE *table, byte *key)
chose the row to change only using a PK or an UNNI.
*/
if
(
table
->
key_info
->
flags
&
HA_NOSAME
)
{
table
->
file
->
ha_index_end
();
DBUG_RETURN
(
0
);
}
while
(
record_compare
(
table
))
{
...
...
@@ -6465,15 +6474,26 @@ static int find_and_fetch_row(TABLE *table, byte *key)
if
((
error
=
table
->
file
->
index_next
(
table
->
record
[
1
])))
{
table
->
file
->
print_error
(
error
,
MYF
(
0
));
table
->
file
->
ha_index_end
();
DBUG_RETURN
(
error
);
}
}
/*
Have to restart the scan to be able to fetch the next row.
*/
table
->
file
->
ha_index_end
();
}
else
{
/* Continue until we find the right record or have made a full loop */
int
restart_count
=
0
;
// Number of times scanning has restarted from top
int
error
=
0
;
int
error
;
/* We don't have a key: search the table using rnd_next() */
if
((
error
=
table
->
file
->
ha_rnd_init
(
1
)))
return
error
;
/* Continue until we find the right record or have made a full loop */
do
{
/*
...
...
@@ -6499,11 +6519,17 @@ static int find_and_fetch_row(TABLE *table, byte *key)
default:
table
->
file
->
print_error
(
error
,
MYF
(
0
));
table
->
file
->
ha_rnd_end
();
DBUG_RETURN
(
error
);
}
}
while
(
restart_count
<
2
&&
record_compare
(
table
));
/*
Have to restart the scan to be able to fetch the next row.
*/
table
->
file
->
ha_rnd_end
();
DBUG_ASSERT
(
error
==
HA_ERR_END_OF_FILE
||
error
==
0
);
DBUG_RETURN
(
error
);
}
...
...
@@ -6626,20 +6652,6 @@ int Delete_rows_log_event::do_exec_row(TABLE *table)
{
DBUG_ASSERT
(
table
!=
NULL
);
if
(
table
->
s
->
keys
>
0
)
{
/* We have a key: search the table using the index */
if
(
!
table
->
file
->
inited
)
if
(
int
error
=
table
->
file
->
ha_index_init
(
0
,
FALSE
))
return
error
;
}
else
{
/* We doesn't have a key: search the table using rnd_next() */
if
(
int
error
=
table
->
file
->
ha_rnd_init
(
1
))
return
error
;
}
int
error
=
find_and_fetch_row
(
table
,
m_key
);
if
(
error
)
return
error
;
...
...
@@ -6651,11 +6663,6 @@ int Delete_rows_log_event::do_exec_row(TABLE *table)
*/
error
=
table
->
file
->
ha_delete_row
(
table
->
record
[
0
]);
/*
Have to restart the scan to be able to fetch the next row.
*/
table
->
file
->
ha_index_or_rnd_end
();
return
error
;
}
...
...
@@ -6736,17 +6743,6 @@ int Update_rows_log_event::do_before_row_operations(TABLE *table)
if
(
!
m_memory
)
return
HA_ERR_OUT_OF_MEM
;
if
(
table
->
s
->
keys
>
0
)
{
/* We have a key: search the table using the index */
if
(
!
table
->
file
->
inited
)
error
=
table
->
file
->
ha_index_init
(
0
,
FALSE
);
}
else
{
/* We doesn't have a key: search the table using rnd_next() */
error
=
table
->
file
->
ha_rnd_init
(
1
);
}
table
->
timestamp_field_type
=
TIMESTAMP_NO_AUTO_SET
;
return
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