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
2f8fd0c4
Commit
2f8fd0c4
authored
Dec 14, 2006
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge mskold@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/windows/Linux_space/MySQL/mysql-4.1-ndb
parents
1c1c35d2
1d23a8f6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
9 deletions
+46
-9
mysql-test/r/ndb_index_unique.result
mysql-test/r/ndb_index_unique.result
+15
-0
mysql-test/t/ndb_index_unique.test
mysql-test/t/ndb_index_unique.test
+8
-0
ndb/src/common/util/File.cpp
ndb/src/common/util/File.cpp
+15
-3
ndb/src/kernel/vm/SimulatedBlock.cpp
ndb/src/kernel/vm/SimulatedBlock.cpp
+8
-6
No files found.
mysql-test/r/ndb_index_unique.result
View file @
2f8fd0c4
...
@@ -133,6 +133,21 @@ a b c
...
@@ -133,6 +133,21 @@ a b c
6 7 2
6 7 2
7 8 3
7 8 3
8 2 3
8 2 3
create unique index bi using hash on t2(b);
insert into t2 values(9, 3, 1);
ERROR 23000: Duplicate entry '' for key 0
alter table t2 drop index bi;
insert into t2 values(9, 3, 1);
select * from t2 order by a;
a b c
2 3 5
3 4 6
4 5 8
5 6 2
6 7 2
7 8 3
8 2 3
9 3 1
drop table t2;
drop table t2;
CREATE TABLE t2 (
CREATE TABLE t2 (
a int unsigned NOT NULL PRIMARY KEY,
a int unsigned NOT NULL PRIMARY KEY,
...
...
mysql-test/t/ndb_index_unique.test
View file @
2f8fd0c4
...
@@ -83,6 +83,14 @@ delete from t2 where a = 1;
...
@@ -83,6 +83,14 @@ delete from t2 where a = 1;
insert
into
t2
values
(
8
,
2
,
3
);
insert
into
t2
values
(
8
,
2
,
3
);
select
*
from
t2
order
by
a
;
select
*
from
t2
order
by
a
;
# Bug #24818 CREATE UNIQUE INDEX (...) USING HASH on a NDB table crashes mysqld
create
unique
index
bi
using
hash
on
t2
(
b
);
--
error
1062
insert
into
t2
values
(
9
,
3
,
1
);
alter
table
t2
drop
index
bi
;
insert
into
t2
values
(
9
,
3
,
1
);
select
*
from
t2
order
by
a
;
drop
table
t2
;
drop
table
t2
;
--
error
1121
--
error
1121
...
...
ndb/src/common/util/File.cpp
View file @
2f8fd0c4
...
@@ -123,13 +123,25 @@ bool
...
@@ -123,13 +123,25 @@ bool
File_class
::
close
()
File_class
::
close
()
{
{
bool
rc
=
true
;
bool
rc
=
true
;
int
retval
=
0
;
if
(
m_file
!=
NULL
)
if
(
m_file
!=
NULL
)
{
{
::
fflush
(
m_file
);
::
fflush
(
m_file
);
rc
=
(
::
fclose
(
m_file
)
==
0
?
true
:
false
);
retval
=
::
fclose
(
m_file
);
m_file
=
NULL
;
// Try again?
while
(
(
retval
!=
0
)
&&
(
errno
==
EINTR
)
){
retval
=
::
fclose
(
m_file
);
}
if
(
retval
==
0
){
rc
=
true
;
}
else
{
rc
=
false
;
ndbout_c
(
"ERROR: Close file error in File.cpp for %s"
,
strerror
(
errno
));
}
}
}
m_file
=
NULL
;
return
rc
;
return
rc
;
}
}
...
...
ndb/src/kernel/vm/SimulatedBlock.cpp
View file @
2f8fd0c4
...
@@ -658,24 +658,26 @@ SimulatedBlock::allocRecord(const char * type, size_t s, size_t n, bool clear)
...
@@ -658,24 +658,26 @@ SimulatedBlock::allocRecord(const char * type, size_t s, size_t n, bool clear)
void
*
p
=
NULL
;
void
*
p
=
NULL
;
size_t
size
=
n
*
s
;
size_t
size
=
n
*
s
;
Uint64
real_size
=
(
Uint64
)((
Uint64
)
n
)
*
((
Uint64
)
s
);
refresh_watch_dog
();
refresh_watch_dog
();
if
(
size
>
0
){
if
(
real_
size
>
0
){
#ifdef VM_TRACE_MEM
#ifdef VM_TRACE_MEM
ndbout_c
(
"%s::allocRecord(%s, %u, %u) = %u bytes"
,
ndbout_c
(
"%s::allocRecord(%s, %u, %u) = %
ll
u bytes"
,
getBlockName
(
number
()),
getBlockName
(
number
()),
type
,
type
,
s
,
s
,
n
,
n
,
size
);
real_
size
);
#endif
#endif
p
=
NdbMem_Allocate
(
size
);
if
(
real_size
==
(
Uint64
)
size
)
p
=
NdbMem_Allocate
(
size
);
if
(
p
==
NULL
){
if
(
p
==
NULL
){
char
buf1
[
255
];
char
buf1
[
255
];
char
buf2
[
255
];
char
buf2
[
255
];
BaseString
::
snprintf
(
buf1
,
sizeof
(
buf1
),
"%s could not allocate memory for %s"
,
BaseString
::
snprintf
(
buf1
,
sizeof
(
buf1
),
"%s could not allocate memory for %s"
,
getBlockName
(
number
()),
type
);
getBlockName
(
number
()),
type
);
BaseString
::
snprintf
(
buf2
,
sizeof
(
buf2
),
"Requested: %ux%u = %u bytes"
,
BaseString
::
snprintf
(
buf2
,
sizeof
(
buf2
),
"Requested: %ux%u = %
ll
u bytes"
,
(
Uint32
)
s
,
(
Uint32
)
n
,
(
Uint
32
)
size
);
(
Uint32
)
s
,
(
Uint32
)
n
,
(
Uint
64
)
real_
size
);
ERROR_SET
(
fatal
,
ERR_MEMALLOC
,
buf1
,
buf2
);
ERROR_SET
(
fatal
,
ERR_MEMALLOC
,
buf1
,
buf2
);
}
}
...
...
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