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
44926664
Commit
44926664
authored
Nov 22, 2004
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-4.1/
into serg.mylan:/usr/home/serg/Abk/mysql-4.1
parents
31f5d69d
41c33c29
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
26 additions
and
5 deletions
+26
-5
extra/perror.c
extra/perror.c
+1
-1
heap/hp_rfirst.c
heap/hp_rfirst.c
+1
-0
mysql-test/r/heap.result
mysql-test/r/heap.result
+7
-0
mysql-test/r/range.result
mysql-test/r/range.result
+2
-2
mysql-test/t/heap.test
mysql-test/t/heap.test
+11
-0
sql/handler.cc
sql/handler.cc
+3
-1
sql/sql_select.cc
sql/sql_select.cc
+1
-1
No files found.
extra/perror.c
View file @
44926664
...
...
@@ -69,7 +69,7 @@ static HA_ERRORS ha_errlist[]=
{
{
120
,
"Didn't find key on read or update"
},
{
121
,
"Duplicate key on write or update"
},
{
123
,
"Someone has changed the row since it was read
; Update with is recoverable
"
},
{
123
,
"Someone has changed the row since it was read
(while the table was locked to prevent it)
"
},
{
124
,
"Wrong index given to function"
},
{
126
,
"Index file is crashed"
},
{
127
,
"Record-file is crashed"
},
...
...
heap/hp_rfirst.c
View file @
44926664
...
...
@@ -52,6 +52,7 @@ int heap_rfirst(HP_INFO *info, byte *record, int inx)
my_errno
=
HA_ERR_END_OF_FILE
;
DBUG_RETURN
(
my_errno
);
}
DBUG_ASSERT
(
0
);
/* TODO fix it */
info
->
current_record
=
0
;
info
->
current_hash_ptr
=
0
;
info
->
update
=
HA_STATE_PREV_FOUND
;
...
...
mysql-test/r/heap.result
View file @
44926664
...
...
@@ -233,3 +233,10 @@ SELECT * FROM t1 WHERE B is not null;
a B
1 1
DROP TABLE t1;
CREATE TABLE t1 (pseudo char(35) PRIMARY KEY, date int(10) unsigned NOT NULL) ENGINE=HEAP;
INSERT INTO t1 VALUES ('massecot',1101106491),('altec',1101106492),('stitch+',1101106304),('Seb Corgan',1101106305),('beerfilou',1101106263),('flaker',1101106529),('joce8',5),('M4vrick',1101106418),('gabay008',1101106525),('Vamp irX',1101106291),('ZoomZip',1101106546),('rip666',1101106502),('CBP ',1101106397),('guezpard',1101106496);
DELETE FROM t1 WHERE date<1101106546;
SELECT * FROM t1;
pseudo date
ZoomZip 1101106546
DROP TABLE t1;
mysql-test/r/range.result
View file @
44926664
...
...
@@ -221,7 +221,7 @@ update t1 set y=x;
explain select * from t1, t1 t2 where t1.y = 2 and t2.x between 7 and t1.y+0;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref y y 5 const 1 Using where
1 SIMPLE t2 range x x 5 NULL 4
Using where
1 SIMPLE t2 range x x 5 NULL 4
Range checked for each record (index map: 0x1)
explain select * from t1, t1 t2 where t1.y = 2 and t2.x >= 7 and t2.x <= t1.y+0;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref y y 5 const 1 Using where
...
...
@@ -237,7 +237,7 @@ id select_type table type possible_keys key key_len ref rows Extra
explain select * from t1, t1 t2 where t1.y = 2 and t2.x between 0 and t1.y;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref y y 5 const 1 Using where
1 SIMPLE t2 ALL x NULL NULL NULL 9
Using where
1 SIMPLE t2 ALL x NULL NULL NULL 9
Range checked for each record (index map: 0x1)
explain select * from t1, t1 t2 where t1.y = 2 and t2.x >= 0 and t2.x <= t1.y;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref y y 5 const 1 Using where
...
...
mysql-test/t/heap.test
View file @
44926664
...
...
@@ -174,3 +174,14 @@ CREATE TABLE t1 (a INT NOT NULL, B INT, KEY(B)) ENGINE=HEAP;
INSERT
INTO
t1
VALUES
(
1
,
1
),
(
1
,
NULL
);
SELECT
*
FROM
t1
WHERE
B
is
not
null
;
DROP
TABLE
t1
;
#
# Bug #6748
# heap_rfirst() doesn't work (and never did!)
#
CREATE
TABLE
t1
(
pseudo
char
(
35
)
PRIMARY
KEY
,
date
int
(
10
)
unsigned
NOT
NULL
)
ENGINE
=
HEAP
;
INSERT
INTO
t1
VALUES
(
'massecot'
,
1101106491
),(
'altec'
,
1101106492
),(
'stitch+'
,
1101106304
),(
'Seb Corgan'
,
1101106305
),(
'beerfilou'
,
1101106263
),(
'flaker'
,
1101106529
),(
'joce8'
,
5
),(
'M4vrick'
,
1101106418
),(
'gabay008'
,
1101106525
),(
'Vamp irX'
,
1101106291
),(
'ZoomZip'
,
1101106546
),(
'rip666'
,
1101106502
),(
'CBP '
,
1101106397
),(
'guezpard'
,
1101106496
);
DELETE
FROM
t1
WHERE
date
<
1101106546
;
SELECT
*
FROM
t1
;
DROP
TABLE
t1
;
sql/handler.cc
View file @
44926664
...
...
@@ -953,8 +953,10 @@ int handler::read_first_row(byte * buf, uint primary_key)
/*
If there is very few deleted rows in the table, find the first row by
scanning the table.
TODO remove the test for HA_READ_ORDER
*/
if
(
deleted
<
10
||
primary_key
>=
MAX_KEY
)
if
(
deleted
<
10
||
primary_key
>=
MAX_KEY
||
!
(
index_flags
(
primary_key
,
0
,
0
)
&
HA_READ_ORDER
))
{
(
void
)
ha_rnd_init
(
1
);
while
((
error
=
rnd_next
(
buf
))
==
HA_ERR_RECORD_DELETED
)
;
...
...
sql/sql_select.cc
View file @
44926664
...
...
@@ -2154,7 +2154,7 @@ add_key_field(KEY_FIELD **key_fields,uint and_level, COND *cond,
bool
is_const
=
1
;
for
(
uint
i
=
0
;
i
<
num_values
;
i
++
)
is_const
&=
(
*
value
)
->
const_item
();
is_const
&=
value
[
i
]
->
const_item
();
if
(
is_const
)
stat
[
0
].
const_keys
.
merge
(
possible_keys
);
/*
...
...
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