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
8e88d8d5
Commit
8e88d8d5
authored
Sep 10, 2006
by
pekka@orca.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndb - bug#20612 ins-del fix in tup
parent
25341539
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
1 deletion
+55
-1
mysql-test/r/ndb_dd_basic.result
mysql-test/r/ndb_dd_basic.result
+20
-0
mysql-test/t/ndb_dd_basic.test
mysql-test/t/ndb_dd_basic.test
+26
-0
storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
+9
-1
No files found.
mysql-test/r/ndb_dd_basic.result
View file @
8e88d8d5
...
...
@@ -422,6 +422,26 @@ SELECT COUNT(*) FROM t1;
COUNT(*)
0
DROP TABLE t1;
CREATE TABLE t1 (
a int NOT NULL,
b varchar(4000), -- must use 2 pages undo
PRIMARY KEY using hash (a)
)
TABLESPACE ts1 STORAGE DISK ENGINE=NDBCLUSTER;
set autocommit = 0;
insert into t1 values(0,'x');
insert into t1 values(1,'x');
insert into t1 values(2,'x');
insert into t1 values(3,'x');
insert into t1 values(4,'x');
insert into t1 values(5,'x');
insert into t1 values(6,'x');
insert into t1 values(7,'x');
insert into t1 values(8,'x');
delete from t1 where a = 0;
commit;
set autocommit = 1;
drop table t1;
ALTER TABLESPACE ts1
DROP DATAFILE 'datafile.dat'
ENGINE = NDB;
...
...
mysql-test/t/ndb_dd_basic.test
View file @
8e88d8d5
...
...
@@ -345,6 +345,32 @@ DELETE FROM t1 WHERE a=2;
SELECT
COUNT
(
*
)
FROM
t1
;
DROP
TABLE
t1
;
# bug#20612 INS-DEL bug (not pgman bug)
# found via disk data assert but is not pgman or disk data related
CREATE
TABLE
t1
(
a
int
NOT
NULL
,
b
varchar
(
4000
),
--
must
use
2
pages
undo
PRIMARY
KEY
using
hash
(
a
)
)
TABLESPACE
ts1
STORAGE
DISK
ENGINE
=
NDBCLUSTER
;
set
autocommit
=
0
;
insert
into
t1
values
(
0
,
'x'
);
insert
into
t1
values
(
1
,
'x'
);
insert
into
t1
values
(
2
,
'x'
);
insert
into
t1
values
(
3
,
'x'
);
insert
into
t1
values
(
4
,
'x'
);
insert
into
t1
values
(
5
,
'x'
);
insert
into
t1
values
(
6
,
'x'
);
insert
into
t1
values
(
7
,
'x'
);
insert
into
t1
values
(
8
,
'x'
);
delete
from
t1
where
a
=
0
;
commit
;
set
autocommit
=
1
;
drop
table
t1
;
###################
# Test Cleanup
###################
...
...
storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
View file @
8e88d8d5
...
...
@@ -1469,7 +1469,15 @@ int Dbtup::handleDeleteReq(Signal* signal,
{
Operationrec
*
prevOp
=
req_struct
->
prevOpPtr
.
p
;
regOperPtr
->
tupVersion
=
prevOp
->
tupVersion
;
regOperPtr
->
m_copy_tuple_location
=
prevOp
->
m_copy_tuple_location
;
// make copy since previous op is committed before this one
const
Uint32
*
org
=
c_undo_buffer
.
get_ptr
(
&
prevOp
->
m_copy_tuple_location
);
Uint32
*
dst
=
c_undo_buffer
.
alloc_copy_tuple
(
&
regOperPtr
->
m_copy_tuple_location
,
regTabPtr
->
total_rec_size
);
if
(
dst
==
0
)
{
terrorCode
=
ZMEM_NOMEM_ERROR
;
goto
error
;
}
memcpy
(
dst
,
org
,
regTabPtr
->
total_rec_size
<<
2
);
}
else
{
...
...
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