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
98a46edb
Commit
98a46edb
authored
May 24, 2007
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.0
into whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb
parents
f0d2042b
351abe5a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
38 additions
and
14 deletions
+38
-14
include/my_sys.h
include/my_sys.h
+1
-1
myisam/mi_check.c
myisam/mi_check.c
+7
-6
mysql-test/r/blackhole.result
mysql-test/r/blackhole.result
+4
-0
mysql-test/t/blackhole.test
mysql-test/t/blackhole.test
+12
-1
mysys/my_seek.c
mysys/my_seek.c
+13
-4
sql/ha_blackhole.h
sql/ha_blackhole.h
+1
-2
No files found.
include/my_sys.h
View file @
98a46edb
...
@@ -66,8 +66,8 @@ extern int NEAR my_errno; /* Last error in mysys */
...
@@ -66,8 +66,8 @@ extern int NEAR my_errno; /* Last error in mysys */
#define MY_ALLOW_ZERO_PTR 64
/* my_realloc() ; zero ptr -> malloc */
#define MY_ALLOW_ZERO_PTR 64
/* my_realloc() ; zero ptr -> malloc */
#define MY_FREE_ON_ERROR 128
/* my_realloc() ; Free old ptr on error */
#define MY_FREE_ON_ERROR 128
/* my_realloc() ; Free old ptr on error */
#define MY_HOLD_ON_ERROR 256
/* my_realloc() ; Return old ptr on error */
#define MY_HOLD_ON_ERROR 256
/* my_realloc() ; Return old ptr on error */
#define MY_THREADSAFE 128
/* pread/pwrite: Don't allow interrupts */
#define MY_DONT_OVERWRITE_FILE 1024
/* my_copy: Don't overwrite file */
#define MY_DONT_OVERWRITE_FILE 1024
/* my_copy: Don't overwrite file */
#define MY_THREADSAFE 2048
/* my_seek(): lock fd mutex */
#define MY_CHECK_ERROR 1
/* Params to my_end; Check open-close */
#define MY_CHECK_ERROR 1
/* Params to my_end; Check open-close */
#define MY_GIVE_INFO 2
/* Give time info about process*/
#define MY_GIVE_INFO 2
/* Give time info about process*/
...
...
myisam/mi_check.c
View file @
98a46edb
...
@@ -335,7 +335,7 @@ int chk_size(MI_CHECK *param, register MI_INFO *info)
...
@@ -335,7 +335,7 @@ int chk_size(MI_CHECK *param, register MI_INFO *info)
flush_key_blocks
(
info
->
s
->
key_cache
,
flush_key_blocks
(
info
->
s
->
key_cache
,
info
->
s
->
kfile
,
FLUSH_FORCE_WRITE
);
info
->
s
->
kfile
,
FLUSH_FORCE_WRITE
);
size
=
my_seek
(
info
->
s
->
kfile
,
0L
,
MY_SEEK_END
,
MYF
(
0
));
size
=
my_seek
(
info
->
s
->
kfile
,
0L
,
MY_SEEK_END
,
MYF
(
MY_THREADSAFE
));
if
((
skr
=
(
my_off_t
)
info
->
state
->
key_file_length
)
!=
size
)
if
((
skr
=
(
my_off_t
)
info
->
state
->
key_file_length
)
!=
size
)
{
{
/* Don't give error if file generated by myisampack */
/* Don't give error if file generated by myisampack */
...
@@ -595,7 +595,8 @@ static int chk_index_down(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo,
...
@@ -595,7 +595,8 @@ static int chk_index_down(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo,
{
{
/* purecov: begin tested */
/* purecov: begin tested */
/* Give it a chance to fit in the real file size. */
/* Give it a chance to fit in the real file size. */
my_off_t
max_length
=
my_seek
(
info
->
s
->
kfile
,
0L
,
MY_SEEK_END
,
MYF
(
0
));
my_off_t
max_length
=
my_seek
(
info
->
s
->
kfile
,
0L
,
MY_SEEK_END
,
MYF
(
MY_THREADSAFE
));
mi_check_print_error
(
param
,
"Invalid key block position: %s "
mi_check_print_error
(
param
,
"Invalid key block position: %s "
"key block size: %u file_length: %s"
,
"key block size: %u file_length: %s"
,
llstr
(
page
,
llbuff
),
keyinfo
->
block_length
,
llstr
(
page
,
llbuff
),
keyinfo
->
block_length
,
...
@@ -4052,10 +4053,10 @@ int test_if_almost_full(MI_INFO *info)
...
@@ -4052,10 +4053,10 @@ int test_if_almost_full(MI_INFO *info)
{
{
if
(
info
->
s
->
options
&
HA_OPTION_COMPRESS_RECORD
)
if
(
info
->
s
->
options
&
HA_OPTION_COMPRESS_RECORD
)
return
0
;
return
0
;
return
(
my_seek
(
info
->
s
->
kfile
,
0L
,
MY_SEEK_END
,
MYF
(
0
))
/
10
*
9
>
return
my_seek
(
info
->
s
->
kfile
,
0L
,
MY_SEEK_END
,
MYF
(
MY_THREADSAFE
))
/
10
*
9
>
(
my_off_t
)
(
info
->
s
->
base
.
max_key_file_length
)
||
(
my_off_t
)
info
->
s
->
base
.
max_key_file_length
||
my_seek
(
info
->
dfile
,
0L
,
MY_SEEK_END
,
MYF
(
0
))
/
10
*
9
>
my_seek
(
info
->
dfile
,
0L
,
MY_SEEK_END
,
MYF
(
0
))
/
10
*
9
>
(
my_off_t
)
info
->
s
->
base
.
max_data_file_length
)
;
(
my_off_t
)
info
->
s
->
base
.
max_data_file_length
;
}
}
/* Recreate table with bigger more alloced record-data */
/* Recreate table with bigger more alloced record-data */
...
...
mysql-test/r/blackhole.result
View file @
98a46edb
...
@@ -123,6 +123,10 @@ master-bin.000001 # Query 1 # use `test`; create table t3 like t1
...
@@ -123,6 +123,10 @@ master-bin.000001 # Query 1 # use `test`; create table t3 like t1
master-bin.000001 # Query 1 # use `test`; insert into t1 select * from t3
master-bin.000001 # Query 1 # use `test`; insert into t1 select * from t3
master-bin.000001 # Query 1 # use `test`; replace into t1 select * from t3
master-bin.000001 # Query 1 # use `test`; replace into t1 select * from t3
drop table t1,t2,t3;
drop table t1,t2,t3;
CREATE TABLE t1(a INT) ENGINE=BLACKHOLE;
INSERT DELAYED INTO t1 VALUES(1);
ERROR HY000: Table storage engine for 't1' doesn't have this option
DROP TABLE t1;
CREATE TABLE t1(a INT, b INT) ENGINE=BLACKHOLE;
CREATE TABLE t1(a INT, b INT) ENGINE=BLACKHOLE;
DELETE FROM t1 WHERE a=10;
DELETE FROM t1 WHERE a=10;
ALTER TABLE t1 ADD INDEX(a);
ALTER TABLE t1 ADD INDEX(a);
...
...
mysql-test/t/blackhole.test
View file @
98a46edb
...
@@ -127,6 +127,17 @@ show binlog events;
...
@@ -127,6 +127,17 @@ show binlog events;
drop
table
t1
,
t2
,
t3
;
drop
table
t1
,
t2
,
t3
;
#
# BUG#27998 - mysqld crashed when executing INSERT DELAYED on a BLACKHOLE
# table
#
CREATE
TABLE
t1
(
a
INT
)
ENGINE
=
BLACKHOLE
;
--
error
1031
INSERT
DELAYED
INTO
t1
VALUES
(
1
);
DROP
TABLE
t1
;
# End of 4.1 tests
#
#
#Bug#19717: DELETE Query Error on BLACKHOLE when using WHERE on column with UNIQUE INDEX
#Bug#19717: DELETE Query Error on BLACKHOLE when using WHERE on column with UNIQUE INDEX
#
#
...
@@ -142,4 +153,4 @@ ALTER TABLE t1 ADD PRIMARY KEY(a);
...
@@ -142,4 +153,4 @@ ALTER TABLE t1 ADD PRIMARY KEY(a);
DELETE
FROM
t1
WHERE
a
=
10
;
DELETE
FROM
t1
WHERE
a
=
10
;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
# End of
4.1
tests
# End of
5.0
tests
mysys/my_seek.c
View file @
98a46edb
...
@@ -23,7 +23,9 @@
...
@@ -23,7 +23,9 @@
my_off_t pos The expected position (absolute or relative)
my_off_t pos The expected position (absolute or relative)
int whence A direction parameter and one of
int whence A direction parameter and one of
{SEEK_SET, SEEK_CUR, SEEK_END}
{SEEK_SET, SEEK_CUR, SEEK_END}
myf MyFlags Not used.
myf MyFlags MY_THREADSAFE must be set in case my_seek may be mixed
with my_pread/my_pwrite calls and fd is shared among
threads.
DESCRIPTION
DESCRIPTION
The my_seek function is a wrapper around the system call lseek and
The my_seek function is a wrapper around the system call lseek and
...
@@ -54,9 +56,16 @@ my_off_t my_seek(File fd, my_off_t pos, int whence,
...
@@ -54,9 +56,16 @@ my_off_t my_seek(File fd, my_off_t pos, int whence,
Make sure we are using a valid file descriptor!
Make sure we are using a valid file descriptor!
*/
*/
DBUG_ASSERT
(
fd
!=
-
1
);
DBUG_ASSERT
(
fd
!=
-
1
);
#if defined(THREAD) && !defined(HAVE_PREAD)
newpos
=
lseek
(
fd
,
pos
,
whence
);
if
(
MyFlags
&
MY_THREADSAFE
)
{
pthread_mutex_lock
(
&
my_file_info
[
fd
].
mutex
);
newpos
=
lseek
(
fd
,
pos
,
whence
);
pthread_mutex_unlock
(
&
my_file_info
[
fd
].
mutex
);
}
else
#endif
newpos
=
lseek
(
fd
,
pos
,
whence
);
if
(
newpos
==
(
os_off_t
)
-
1
)
if
(
newpos
==
(
os_off_t
)
-
1
)
{
{
my_errno
=
errno
;
my_errno
=
errno
;
...
...
sql/ha_blackhole.h
View file @
98a46edb
...
@@ -43,8 +43,7 @@ class ha_blackhole: public handler
...
@@ -43,8 +43,7 @@ class ha_blackhole: public handler
{
{
return
(
HA_NULL_IN_KEY
|
HA_CAN_FULLTEXT
|
HA_CAN_SQL_HANDLER
|
return
(
HA_NULL_IN_KEY
|
HA_CAN_FULLTEXT
|
HA_CAN_SQL_HANDLER
|
HA_DUPP_POS
|
HA_CAN_INDEX_BLOBS
|
HA_AUTO_PART_KEY
|
HA_DUPP_POS
|
HA_CAN_INDEX_BLOBS
|
HA_AUTO_PART_KEY
|
HA_FILE_BASED
|
HA_CAN_GEOMETRY
|
HA_READ_RND_SAME
|
HA_FILE_BASED
|
HA_CAN_GEOMETRY
|
HA_READ_RND_SAME
);
HA_CAN_INSERT_DELAYED
);
}
}
ulong
index_flags
(
uint
inx
,
uint
part
,
bool
all_parts
)
const
ulong
index_flags
(
uint
inx
,
uint
part
,
bool
all_parts
)
const
{
{
...
...
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