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
2061b38e
Commit
2061b38e
authored
Jul 22, 2005
by
pappa@c-8b0ae253.1238-1-64736c10.cust.bredbandsbolaget.se
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug #12114 patch
parent
56735c7a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
79 additions
and
5 deletions
+79
-5
mysql-test/r/ndb_partition_error.result
mysql-test/r/ndb_partition_error.result
+26
-0
mysql-test/t/ndb_partition_error.test
mysql-test/t/ndb_partition_error.test
+45
-0
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
+8
-5
No files found.
mysql-test/r/ndb_partition_error.result
0 → 100644
View file @
2061b38e
drop table if exists t1;
CREATE TABLE t1 (
a int not null,
b int not null,
c int not null,
primary key(a,b),
index (a))
engine = ndb
partition by range (a)
partitions 3
(partition x1 values less than (5) nodegroup 12,
partition x2 values less than (10) nodegroup 13,
partition x3 values less than (20) nodegroup 14);
ERROR HY000: Can't create table './test/t1.frm' (errno: 1305)
CREATE TABLE t1 (
a int not null,
b int not null,
c int not null,
primary key(a))
engine = ndb
partition by range (a)
partitions 3
(partition x1 values less than (5),
partition x2 values less than (10),
partition x3 values less than (20));
drop table t1;
mysql-test/t/ndb_partition_error.test
0 → 100644
View file @
2061b38e
--
source
include
/
have_ndb
.
inc
#--disable_abort_on_error
#
# Simple test for the partition storage engine
# Focuses on range partitioning tests
#
#-- source include/have_partition.inc
--
disable_warnings
drop
table
if
exists
t1
;
--
enable_warnings
#
# Partition by range, generate node group error
#
--
error
1005
CREATE
TABLE
t1
(
a
int
not
null
,
b
int
not
null
,
c
int
not
null
,
primary
key
(
a
,
b
),
index
(
a
))
engine
=
ndb
partition
by
range
(
a
)
partitions
3
(
partition
x1
values
less
than
(
5
)
nodegroup
12
,
partition
x2
values
less
than
(
10
)
nodegroup
13
,
partition
x3
values
less
than
(
20
)
nodegroup
14
);
#
# Partition by range, create normal valid table
#
CREATE
TABLE
t1
(
a
int
not
null
,
b
int
not
null
,
c
int
not
null
,
primary
key
(
a
))
engine
=
ndb
partition
by
range
(
a
)
partitions
3
(
partition
x1
values
less
than
(
5
),
partition
x2
values
less
than
(
10
),
partition
x3
values
less
than
(
20
));
drop
table
t1
;
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
View file @
2061b38e
...
...
@@ -2912,8 +2912,6 @@ Dbdict::execCREATE_TABLE_REQ(Signal* signal){
break
;
}
createTabPtr
.
p
->
key
=
++
c_opRecordSequence
;
c_opCreateTable
.
add
(
createTabPtr
);
createTabPtr
.
p
->
m_errorCode
=
0
;
createTabPtr
.
p
->
m_senderRef
=
senderRef
;
createTabPtr
.
p
->
m_senderData
=
senderData
;
...
...
@@ -2922,11 +2920,12 @@ Dbdict::execCREATE_TABLE_REQ(Signal* signal){
createTabPtr
.
p
->
m_fragmentsPtrI
=
RNIL
;
createTabPtr
.
p
->
m_dihAddFragPtr
=
RNIL
;
Uint32
key
=
c_opRecordSequence
+
1
;
Uint32
*
theData
=
signal
->
getDataPtrSend
(),
i
;
Uint16
*
node_group
=
(
Uint16
*
)
&
signal
->
theData
[
25
];
CreateFragmentationReq
*
const
req
=
(
CreateFragmentationReq
*
)
theData
;
req
->
senderRef
=
reference
();
req
->
senderData
=
createTabPtr
.
p
->
key
;
req
->
senderData
=
key
;
req
->
primaryTableId
=
parseRecord
.
tablePtr
.
p
->
primaryTableId
;
req
->
noOfFragments
=
parseRecord
.
tablePtr
.
p
->
ngLen
>>
1
;
req
->
fragmentationType
=
parseRecord
.
tablePtr
.
p
->
fragmentType
;
...
...
@@ -2966,9 +2965,13 @@ Dbdict::execCREATE_TABLE_REQ(Signal* signal){
{
jam
();
parseRecord
.
errorCode
=
signal
->
theData
[
0
];
c_opCreateTable
.
release
(
createTabPtr
);
releaseTableObject
(
parseRecord
.
tablePtr
.
i
,
true
);
break
;
}
createTabPtr
.
p
->
key
=
key
;
c_opRecordSequence
++
;
c_opCreateTable
.
add
(
createTabPtr
);
c_blockState
=
BS_CREATE_TAB
;
return
;
}
while
(
0
);
...
...
@@ -2976,8 +2979,8 @@ Dbdict::execCREATE_TABLE_REQ(Signal* signal){
/**
* Something went wrong
*/
releaseSections
(
signal
);
releaseSections
(
signal
);
CreateTableRef
*
ref
=
(
CreateTableRef
*
)
signal
->
getDataPtrSend
();
ref
->
senderData
=
senderData
;
ref
->
senderRef
=
reference
();
...
...
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