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
58443d61
Commit
58443d61
authored
Mar 18, 2006
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Post-review fixes for bug#17899 Partitions: crash, NDB, Select .. ORDER BY
parent
69aa271d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
mysql-test/t/ndb_partition_list.test
mysql-test/t/ndb_partition_list.test
+1
-1
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+8
-8
No files found.
mysql-test/t/ndb_partition_list.test
View file @
58443d61
...
...
@@ -55,7 +55,7 @@ INSERT INTO t1 SET f_int1 = -1, f_int2 = 20, f_char1 = '20', f_char2 = '20', f_c
INSERT
INTO
t1
SET
f_int1
=
0
,
f_int2
=
20
,
f_char1
=
'20'
,
f_char2
=
'20'
,
f_charbig
=
'===20==='
;
INSERT
INTO
t1
SET
f_int1
=
1
,
f_int2
=
1
,
f_char1
=
'1'
,
f_char2
=
'1'
,
f_charbig
=
'===1==='
;
INSERT
INTO
t1
SET
f_int1
=
2
,
f_int2
=
1
,
f_char1
=
'1'
,
f_char2
=
'1'
,
f_charbig
=
'===1==='
;
--
error
1505
--
error
ER_NO_PARTITION_FOR_GIVEN_VALUE
INSERT
INTO
t1
SET
f_int1
=
20
,
f_int2
=
1
,
f_char1
=
'1'
,
f_char2
=
'1'
,
f_charbig
=
'===1==='
;
SELECT
*
FROM
t1
ORDER
BY
f_int1
;
...
...
sql/ha_ndbcluster.cc
View file @
58443d61
...
...
@@ -960,12 +960,8 @@ int ha_ndbcluster::get_ndb_value(NdbOperation *ndb_op, Field *field,
int
ha_ndbcluster
::
get_ndb_partition_id
(
NdbOperation
*
ndb_op
)
{
DBUG_ENTER
(
"get_ndb_partition_id"
);
uint
partition_id_fieldnr
=
table_share
->
fields
+
1
;
m_value
[
partition_id_fieldnr
].
rec
=
ndb_op
->
getValue
(
NdbDictionary
::
Column
::
FRAGMENT
,
(
char
*
)
&
m_part_id
);
DBUG_RETURN
(
m_value
[
partition_id_fieldnr
].
rec
==
NULL
);
DBUG_RETURN
(
ndb_op
->
getValue
(
NdbDictionary
::
Column
::
FRAGMENT
,
(
char
*
)
&
m_part_id
)
==
NULL
);
}
/*
...
...
@@ -3271,7 +3267,7 @@ int ha_ndbcluster::rnd_pos(byte *buf, byte *pos)
else
{
key_range
key_spec
;
KEY
*
key_info
=
table
->
key_info
+
active_index
;
KEY
*
key_info
=
table
->
key_info
+
table_share
->
primary_key
;
key_spec
.
key
=
pos
;
key_spec
.
length
=
key_length
;
key_spec
.
flag
=
HA_READ_KEY_EXACT
;
...
...
@@ -3298,11 +3294,13 @@ void ha_ndbcluster::position(const byte *record)
KEY_PART_INFO
*
key_part
;
KEY_PART_INFO
*
end
;
byte
*
buff
;
uint
key_length
=
ref_length
;
uint
key_length
;
DBUG_ENTER
(
"position"
);
if
(
table_share
->
primary_key
!=
MAX_KEY
)
{
key_length
=
ref_length
;
key_info
=
table
->
key_info
+
table_share
->
primary_key
;
key_part
=
key_info
->
key_part
;
end
=
key_part
+
key_info
->
key_parts
;
...
...
@@ -3352,6 +3350,8 @@ void ha_ndbcluster::position(const byte *record)
key_length
=
ref_length
-
sizeof
(
m_part_id
);
memcpy
(
ref
+
key_length
,
(
void
*
)
&
m_part_id
,
sizeof
(
m_part_id
));
}
else
key_length
=
ref_length
;
#ifndef DBUG_OFF
int
hidden_no
=
table
->
s
->
fields
;
const
NDBTAB
*
tab
=
(
const
NDBTAB
*
)
m_table
;
...
...
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