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
920c16c0
Commit
920c16c0
authored
May 19, 2005
by
msvensson@neptunus.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG#9626 valgrind warnings
- after review fixes
parent
a996abc5
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
5 deletions
+26
-5
mysql-test/r/ndb_basic.result
mysql-test/r/ndb_basic.result
+6
-0
mysql-test/t/ndb_basic.test
mysql-test/t/ndb_basic.test
+9
-0
ndb/include/transporter/TransporterDefinitions.hpp
ndb/include/transporter/TransporterDefinitions.hpp
+2
-1
ndb/src/ndbapi/NdbDictionaryImpl.cpp
ndb/src/ndbapi/NdbDictionaryImpl.cpp
+9
-4
No files found.
mysql-test/r/ndb_basic.result
View file @
920c16c0
...
...
@@ -667,3 +667,9 @@ counter datavalue
57 newval
58 newval
drop table t1;
create table atablewithareallylongandirritatingname (a int);
insert into atablewithareallylongandirritatingname values (2);
select * from atablewithareallylongandirritatingname;
a
2
drop table atablewithareallylongandirritatingname;
mysql-test/t/ndb_basic.test
View file @
920c16c0
...
...
@@ -605,3 +605,12 @@ insert into t1 (datavalue) select datavalue from t1 where counter < 100;
select
*
from
t1
order
by
counter
;
drop
table
t1
;
#
# Test long table name
#
create
table
atablewithareallylongandirritatingname
(
a
int
);
insert
into
atablewithareallylongandirritatingname
values
(
2
);
select
*
from
atablewithareallylongandirritatingname
;
drop
table
atablewithareallylongandirritatingname
;
ndb/include/transporter/TransporterDefinitions.hpp
View file @
920c16c0
...
...
@@ -45,8 +45,9 @@ enum SendStatus {
* Protocol6 Header +
* (optional signal id) + (optional checksum) + (signal data)
*/
const
Uint32
MAX_SECTION_SIZE
=
4096
;
//const Uint32 MAX_MESSAGE_SIZE = (12+4+4+(4*25));
const
Uint32
MAX_MESSAGE_SIZE
=
(
12
+
4
+
4
+
(
4
*
25
)
+
(
3
*
4
)
+
4
*
4096
);
const
Uint32
MAX_MESSAGE_SIZE
=
(
12
+
4
+
4
+
(
4
*
25
)
+
(
3
*
4
)
+
4
*
MAX_SECTION_SIZE
);
/**
* TransporterConfiguration
...
...
ndb/src/ndbapi/NdbDictionaryImpl.cpp
View file @
920c16c0
...
...
@@ -1088,6 +1088,7 @@ NdbDictInterface::getTable(int tableId, bool fullyQualifiedNames)
Send GET_TABINFOREQ signal with the table name in the first
long section part
*/
NdbTableImpl
*
NdbDictInterface
::
getTable
(
const
char
*
name
,
bool
fullyQualifiedNames
)
{
...
...
@@ -1095,12 +1096,16 @@ NdbDictInterface::getTable(const char * name, bool fullyQualifiedNames)
GetTabInfoReq
*
const
req
=
CAST_PTR
(
GetTabInfoReq
,
tSignal
.
getDataPtrSend
());
const
Uint32
str_len
=
strlen
(
name
)
+
1
;
// NULL terminated
const
Uint32
str_len_words
=
(
str_len
+
3
)
/
4
;
// Size in words
/* Note! It might be a good idea to check that the length of
table name does not exceed the max size of a long signal */
if
(
str_len
>
MAX_SECTION_SIZE
)
{
m_error
.
code
=
4307
;
return
0
;
}
m_namebuf
.
clear
();
m_namebuf
.
grow
(
str_len
+
(
4
-
str_len
%
4
));
// Round up to word size
m_namebuf
.
grow
(
str_len
_words
*
4
);
// Word size aligned number of bytes
m_namebuf
.
append
(
name
,
str_len
);
req
->
senderRef
=
m_reference
;
...
...
@@ -1114,7 +1119,7 @@ NdbDictInterface::getTable(const char * name, bool fullyQualifiedNames)
LinearSectionPtr
ptr
[
1
];
ptr
[
0
].
p
=
(
Uint32
*
)
m_namebuf
.
get_data
();
ptr
[
0
].
sz
=
(
str_len
+
3
)
/
4
;
// Size in words
ptr
[
0
].
sz
=
str_len_words
;
return
getTable
(
&
tSignal
,
ptr
,
1
,
fullyQualifiedNames
);
}
...
...
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