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
b2aa8dd4
Commit
b2aa8dd4
authored
Jun 14, 2007
by
tomas@whalegate.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug #29103 ndb_restore segfaults on NULL var[char|binary]
parent
ca7180c7
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
24 deletions
+27
-24
mysql-test/r/ndb_restore.result
mysql-test/r/ndb_restore.result
+10
-10
mysql-test/t/ndb_restore.test
mysql-test/t/ndb_restore.test
+1
-1
storage/ndb/tools/restore/consumer_restore.cpp
storage/ndb/tools/restore/consumer_restore.cpp
+16
-13
No files found.
mysql-test/r/ndb_restore.result
View file @
b2aa8dd4
...
...
@@ -18,7 +18,7 @@ CREATE TABLE `t2_c` (
PRIMARY KEY (`capgotod`),
KEY `i quadaddsvr` (`gotod`)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
INSERT INTO `t2_c` VALUES (500,4,'','q3.net','addavp:MK_CASELECTOR=1','postorod rattoaa'),(2,1,'4','','addavp:MK_BRANDTAD=345','REDS Brandtad'),(3,2,'4','q3.net','execorder','fixedRatediPO REDS'),(1,1,'3','','addavp:MK_BRANDTAD=123','TEST Brandtad'),(6,5,'','told.q3.net','addavp:MK_BRANDTAD=123','Brandtad Toldzone'),(4,3,'3','q3.net','addavp:MK_POOLHINT=2','ratedi PO TEST');
INSERT INTO `t2_c` VALUES (500,4,'','q3.net','addavp:MK_CASELECTOR=1','postorod rattoaa'),(2,1,'4','','addavp:MK_BRANDTAD=345','REDS Brandtad'),(3,2,'4','q3.net','execorder','fixedRatediPO REDS'),(1,1,'3','','addavp:MK_BRANDTAD=123','TEST Brandtad'),(6,5,'','told.q3.net','addavp:MK_BRANDTAD=123','Brandtad Toldzone'),(4,3,'3','q3.net','addavp:MK_POOLHINT=2','ratedi PO TEST')
,(5,0,'',NULL,NULL,'')
;
CREATE TABLE `t3_c` (
`CapGoaledatta` smallint(5) unsigned NOT NULL default '0',
`capgotod` smallint(5) unsigned NOT NULL default '0',
...
...
@@ -154,15 +154,15 @@ count(*)
5
select count(*) from t2;
count(*)
6
7
select count(*) from t2_c;
count(*)
6
7
select count(*)
from (select * from t2 union
select * from t2_c) a;
count(*)
6
7
select count(*) from t3;
count(*)
4
...
...
@@ -286,15 +286,15 @@ count(*)
5
select count(*) from t2;
count(*)
6
7
select count(*) from t2_c;
count(*)
6
7
select count(*)
from (select * from t2 union
select * from t2_c) a;
count(*)
6
7
select count(*) from t3;
count(*)
4
...
...
@@ -386,15 +386,15 @@ count(*)
5
select count(*) from t2;
count(*)
6
7
select count(*) from t2_c;
count(*)
6
7
select count(*)
from (select * from t2 union
select * from t2_c) a;
count(*)
6
7
select count(*) from t3;
count(*)
4
...
...
mysql-test/t/ndb_restore.test
View file @
b2aa8dd4
...
...
@@ -33,7 +33,7 @@ CREATE TABLE `t2_c` (
PRIMARY
KEY
(
`capgotod`
),
KEY
`i quadaddsvr`
(
`gotod`
)
)
ENGINE
=
ndbcluster
DEFAULT
CHARSET
=
latin1
;
INSERT
INTO
`t2_c`
VALUES
(
500
,
4
,
''
,
'q3.net'
,
'addavp:MK_CASELECTOR=1'
,
'postorod rattoaa'
),(
2
,
1
,
'4'
,
''
,
'addavp:MK_BRANDTAD=345'
,
'REDS Brandtad'
),(
3
,
2
,
'4'
,
'q3.net'
,
'execorder'
,
'fixedRatediPO REDS'
),(
1
,
1
,
'3'
,
''
,
'addavp:MK_BRANDTAD=123'
,
'TEST Brandtad'
),(
6
,
5
,
''
,
'told.q3.net'
,
'addavp:MK_BRANDTAD=123'
,
'Brandtad Toldzone'
),(
4
,
3
,
'3'
,
'q3.net'
,
'addavp:MK_POOLHINT=2'
,
'ratedi PO TEST'
);
INSERT
INTO
`t2_c`
VALUES
(
500
,
4
,
''
,
'q3.net'
,
'addavp:MK_CASELECTOR=1'
,
'postorod rattoaa'
),(
2
,
1
,
'4'
,
''
,
'addavp:MK_BRANDTAD=345'
,
'REDS Brandtad'
),(
3
,
2
,
'4'
,
'q3.net'
,
'execorder'
,
'fixedRatediPO REDS'
),(
1
,
1
,
'3'
,
''
,
'addavp:MK_BRANDTAD=123'
,
'TEST Brandtad'
),(
6
,
5
,
''
,
'told.q3.net'
,
'addavp:MK_BRANDTAD=123'
,
'Brandtad Toldzone'
),(
4
,
3
,
'3'
,
'q3.net'
,
'addavp:MK_POOLHINT=2'
,
'ratedi PO TEST'
)
,(
5
,
0
,
''
,
NULL
,
NULL
,
''
)
;
# Added ROW_FORMAT=FIXED to use below to see that setting is preserved
# by restore
...
...
storage/ndb/tools/restore/consumer_restore.cpp
View file @
b2aa8dd4
...
...
@@ -1158,6 +1158,8 @@ void BackupRestore::tuple_a(restore_callback_t *cb)
char
*
dataPtr
=
attr_data
->
string_value
;
Uint32
length
=
0
;
if
(
!
attr_data
->
null
)
{
const
unsigned
char
*
src
=
(
const
unsigned
char
*
)
dataPtr
;
switch
(
attr_desc
->
m_column
->
getType
()){
case
NdbDictionary
:
:
Column
::
Varchar
:
...
...
@@ -1172,6 +1174,7 @@ void BackupRestore::tuple_a(restore_callback_t *cb)
length
=
attr_data
->
size
;
break
;
}
}
if
(
j
==
0
&&
tup
.
getTable
()
->
have_auto_inc
(
i
))
tup
.
getTable
()
->
update_max_auto_val
(
dataPtr
,
size
*
arraySize
);
...
...
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