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
2200e35c
Commit
2200e35c
authored
Feb 18, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge pnousiainen@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb
into mysql.com:/space/pekka/ndb/version/my50-ndb
parents
c7afc80b
9ab62ea5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
29 deletions
+32
-29
ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
+24
-23
ndb/src/ndbapi/NdbOperationInt.cpp
ndb/src/ndbapi/NdbOperationInt.cpp
+8
-6
No files found.
ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
View file @
2200e35c
...
@@ -1837,12 +1837,8 @@ int Dbtup::interpreterNextLab(Signal* signal,
...
@@ -1837,12 +1837,8 @@ int Dbtup::interpreterNextLab(Signal* signal,
tmpHabitant
=
attrId
;
tmpHabitant
=
attrId
;
}
}
// get type
attrId
>>=
16
;
attrId
>>=
16
;
AttributeHeader
ah
(
tmpArea
[
0
]);
const
char
*
s1
=
(
char
*
)
&
tmpArea
[
1
];
const
char
*
s2
=
(
char
*
)
&
TcurrentProgram
[
TprogramCounter
+
1
];
Uint32
attrLen
=
(
4
*
ah
.
getDataSize
());
Uint32
TattrDescrIndex
=
tabptr
.
p
->
tabDescriptor
+
Uint32
TattrDescrIndex
=
tabptr
.
p
->
tabDescriptor
+
(
attrId
<<
ZAD_LOG_SIZE
);
(
attrId
<<
ZAD_LOG_SIZE
);
Uint32
TattrDesc1
=
tableDescriptor
[
TattrDescrIndex
].
tabDescr
;
Uint32
TattrDesc1
=
tableDescriptor
[
TattrDescrIndex
].
tabDescr
;
...
@@ -1855,27 +1851,32 @@ int Dbtup::interpreterNextLab(Signal* signal,
...
@@ -1855,27 +1851,32 @@ int Dbtup::interpreterNextLab(Signal* signal,
cs
=
tabptr
.
p
->
charsetArray
[
pos
];
cs
=
tabptr
.
p
->
charsetArray
[
pos
];
}
}
const
NdbSqlUtil
::
Type
&
sqlType
=
NdbSqlUtil
::
getType
(
typeId
);
const
NdbSqlUtil
::
Type
&
sqlType
=
NdbSqlUtil
::
getType
(
typeId
);
// get data
AttributeHeader
ah
(
tmpArea
[
0
]);
const
char
*
s1
=
(
char
*
)
&
tmpArea
[
1
];
const
char
*
s2
=
(
char
*
)
&
TcurrentProgram
[
TprogramCounter
+
1
];
// fixed length in 5.0
Uint32
attrLen
=
AttributeDescriptor
::
getSizeInBytes
(
TattrDesc1
);
bool
r1_null
=
ah
.
isNULL
();
bool
r1_null
=
ah
.
isNULL
();
bool
r2_null
=
argLen
==
0
;
bool
r2_null
=
argLen
==
0
;
int
res
;
int
res
;
if
(
r1_null
||
r2_null
)
if
(
cond
!=
Interpreter
::
LIKE
&&
{
cond
!=
Interpreter
::
NOT_LIKE
)
{
res
=
r1_null
&&
r2_null
?
0
:
r1_null
?
-
1
:
1
;
if
(
r1_null
||
r2_null
)
{
}
// NULL==NULL and NULL<not-NULL
else
if
(
cond
!=
Interpreter
::
LIKE
&&
res
=
r1_null
&&
r2_null
?
0
:
r1_null
?
-
1
:
1
;
cond
!=
Interpreter
::
NOT_LIKE
)
}
else
{
{
res
=
(
*
sqlType
.
m_cmp
)(
cs
,
s1
,
attrLen
,
s2
,
argLen
,
true
);
/* --------------------------------------------------------- */
}
// If length of argument rounded to nearest word is
}
else
{
// the same as attribute size, use that as argument size
if
(
r1_null
||
r2_null
)
{
/* --------------------------------------------------------- */
// NULL like NULL is true (has no practical use)
if
((((
argLen
+
3
)
>>
2
)
<<
2
)
==
attrLen
)
argLen
=
attrLen
;
res
=
r1_null
&&
r2_null
?
0
:
-
1
;
res
=
(
*
sqlType
.
m_cmp
)(
cs
,
s1
,
attrLen
,
s2
,
argLen
,
true
);
}
else
{
}
res
=
(
*
sqlType
.
m_like
)(
cs
,
s1
,
attrLen
,
s2
,
argLen
);
else
}
{
res
=
(
*
sqlType
.
m_like
)(
cs
,
s1
,
attrLen
,
s2
,
argLen
);
}
}
switch
((
Interpreter
::
BinaryCondition
)
cond
)
{
switch
((
Interpreter
::
BinaryCondition
)
cond
)
{
...
...
ndb/src/ndbapi/NdbOperationInt.cpp
View file @
2200e35c
...
@@ -1027,13 +1027,15 @@ NdbOperation::branch_col(Uint32 type,
...
@@ -1027,13 +1027,15 @@ NdbOperation::branch_col(Uint32 type,
}
}
Uint32
sizeInBytes
=
col
->
m_attrSize
*
col
->
m_arraySize
;
Uint32
sizeInBytes
=
col
->
m_attrSize
*
col
->
m_arraySize
;
if
(
len
!=
0
&&
len
!=
sizeInBytes
)
if
(
!
col
->
getCharType
())
{
{
// prevent assert in NdbSqlUtil on length error
setErrorCodeAbort
(
4209
);
if
(
len
!=
0
&&
len
!=
sizeInBytes
)
return
-
1
;
{
setErrorCodeAbort
(
4209
);
return
-
1
;
}
len
=
sizeInBytes
;
}
}
len
=
sizeInBytes
;
if
(
insertATTRINFO
(
Interpreter
::
BranchCol
(
c
,
0
,
0
,
false
))
==
-
1
)
if
(
insertATTRINFO
(
Interpreter
::
BranchCol
(
c
,
0
,
0
,
false
))
==
-
1
)
return
-
1
;
return
-
1
;
...
...
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