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
d0e8dbc4
Commit
d0e8dbc4
authored
Jan 12, 2011
by
Michael Widenius
Browse files
Options
Browse Files
Download
Plain Diff
Merge with 5.1
parents
6bc209c2
21332120
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
7 deletions
+37
-7
mysql-test/suite/handler/innodb.result
mysql-test/suite/handler/innodb.result
+10
-0
mysql-test/suite/handler/innodb.test
mysql-test/suite/handler/innodb.test
+11
-0
sql/handler.h
sql/handler.h
+14
-5
storage/federated/ha_federated.cc
storage/federated/ha_federated.cc
+0
-2
storage/maria/ma_pagecache.c
storage/maria/ma_pagecache.c
+2
-0
No files found.
mysql-test/suite/handler/innodb.result
View file @
d0e8dbc4
...
@@ -560,3 +560,13 @@ HANDLER t1 READ a NEXT;
...
@@ -560,3 +560,13 @@ HANDLER t1 READ a NEXT;
a
a
HANDLER t1 CLOSE;
HANDLER t1 CLOSE;
DROP TABLE t1;
DROP TABLE t1;
CREATE TABLE t1 (f1 integer, f2 integer, primary key (f1), key (f2)) engine=innodb;
INSERT INTO t1 VALUES (1,1),(2,2),(3,3);
HANDLER t1 OPEN;
HANDLER t1 READ FIRST WHERE f2 <= 1;
f1 f2
1 1
HANDLER t1 READ `PRIMARY` PREV;
f1 f2
3 3
DROP TABLE t1;
mysql-test/suite/handler/innodb.test
View file @
d0e8dbc4
...
@@ -15,3 +15,14 @@ let $engine_type= InnoDB;
...
@@ -15,3 +15,14 @@ let $engine_type= InnoDB;
--
source
init
.
inc
--
source
init
.
inc
--
source
handler
.
inc
--
source
handler
.
inc
#
# LP#697610 ha_index_prev(uchar*): Assertion `inited==INDEX'
#
CREATE
TABLE
t1
(
f1
integer
,
f2
integer
,
primary
key
(
f1
),
key
(
f2
))
engine
=
innodb
;
INSERT
INTO
t1
VALUES
(
1
,
1
),(
2
,
2
),(
3
,
3
);
HANDLER
t1
OPEN
;
HANDLER
t1
READ
FIRST
WHERE
f2
<=
1
;
HANDLER
t1
READ
`PRIMARY`
PREV
;
DROP
TABLE
t1
;
sql/handler.h
View file @
d0e8dbc4
...
@@ -1195,14 +1195,18 @@ class handler :public Sql_alloc
...
@@ -1195,14 +1195,18 @@ class handler :public Sql_alloc
DBUG_ENTER
(
"ha_index_init"
);
DBUG_ENTER
(
"ha_index_init"
);
DBUG_ASSERT
(
inited
==
NONE
);
DBUG_ASSERT
(
inited
==
NONE
);
if
(
!
(
result
=
index_init
(
idx
,
sorted
)))
if
(
!
(
result
=
index_init
(
idx
,
sorted
)))
inited
=
INDEX
;
{
inited
=
INDEX
;
active_index
=
idx
;
}
DBUG_RETURN
(
result
);
DBUG_RETURN
(
result
);
}
}
int
ha_index_end
()
int
ha_index_end
()
{
{
DBUG_ENTER
(
"ha_index_end"
);
DBUG_ENTER
(
"ha_index_end"
);
DBUG_ASSERT
(
inited
==
INDEX
);
DBUG_ASSERT
(
inited
==
INDEX
);
inited
=
NONE
;
inited
=
NONE
;
active_index
=
MAX_KEY
;
DBUG_RETURN
(
index_end
());
DBUG_RETURN
(
index_end
());
}
}
/* This is called after index_init() if we need to do a index scan */
/* This is called after index_init() if we need to do a index scan */
...
@@ -1371,7 +1375,12 @@ class handler :public Sql_alloc
...
@@ -1371,7 +1375,12 @@ class handler :public Sql_alloc
as there may be several calls to this routine.
as there may be several calls to this routine.
*/
*/
virtual
void
column_bitmaps_signal
();
virtual
void
column_bitmaps_signal
();
uint
get_index
(
void
)
const
{
return
active_index
;
}
/*
We have to check for inited as some engines, like innodb, sets
active_index during table scan.
*/
uint
get_index
(
void
)
const
{
return
inited
==
INDEX
?
active_index
:
MAX_KEY
;
}
virtual
int
close
(
void
)
=
0
;
virtual
int
close
(
void
)
=
0
;
/**
/**
...
@@ -1824,8 +1833,8 @@ class handler :public Sql_alloc
...
@@ -1824,8 +1833,8 @@ class handler :public Sql_alloc
*/
*/
virtual
int
open
(
const
char
*
name
,
int
mode
,
uint
test_if_locked
)
=
0
;
virtual
int
open
(
const
char
*
name
,
int
mode
,
uint
test_if_locked
)
=
0
;
virtual
int
index_init
(
uint
idx
,
bool
sorted
)
{
active_index
=
idx
;
return
0
;
}
virtual
int
index_init
(
uint
idx
,
bool
sorted
)
{
return
0
;
}
virtual
int
index_end
()
{
active_index
=
MAX_KEY
;
return
0
;
}
virtual
int
index_end
()
{
return
0
;
}
/**
/**
rnd_init() can be called two times without rnd_end() in between
rnd_init() can be called two times without rnd_end() in between
(it only makes sense if scan=1).
(it only makes sense if scan=1).
...
...
storage/federated/ha_federated.cc
View file @
d0e8dbc4
...
@@ -2453,7 +2453,6 @@ int ha_federated::index_init(uint keynr, bool sorted)
...
@@ -2453,7 +2453,6 @@ int ha_federated::index_init(uint keynr, bool sorted)
{
{
DBUG_ENTER
(
"ha_federated::index_init"
);
DBUG_ENTER
(
"ha_federated::index_init"
);
DBUG_PRINT
(
"info"
,
(
"table: '%s' key: %u"
,
table
->
s
->
table_name
.
str
,
keynr
));
DBUG_PRINT
(
"info"
,
(
"table: '%s' key: %u"
,
table
->
s
->
table_name
.
str
,
keynr
));
active_index
=
keynr
;
DBUG_RETURN
(
0
);
DBUG_RETURN
(
0
);
}
}
...
@@ -2589,7 +2588,6 @@ int ha_federated::index_end(void)
...
@@ -2589,7 +2588,6 @@ int ha_federated::index_end(void)
{
{
DBUG_ENTER
(
"ha_federated::index_end"
);
DBUG_ENTER
(
"ha_federated::index_end"
);
free_result
();
free_result
();
active_index
=
MAX_KEY
;
DBUG_RETURN
(
0
);
DBUG_RETURN
(
0
);
}
}
...
...
storage/maria/ma_pagecache.c
View file @
d0e8dbc4
...
@@ -759,6 +759,8 @@ ulong init_pagecache(PAGECACHE *pagecache, size_t use_mem,
...
@@ -759,6 +759,8 @@ ulong init_pagecache(PAGECACHE *pagecache, size_t use_mem,
{
{
if
(
blocks
<
8
)
if
(
blocks
<
8
)
{
{
my_message
(
ENOMEM
,
"Not enough memory to allocate 8 pagecache pages"
,
MYF
(
0
));
my_errno
=
ENOMEM
;
my_errno
=
ENOMEM
;
goto
err
;
goto
err
;
}
}
...
...
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