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
d99e50c8
Commit
d99e50c8
authored
Aug 22, 2002
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge work:/home/bk/mysql-4.0 into hundin.mysql.fi:/my/bk/mysql-4.0
parents
f47da524
3f1fa940
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
216 additions
and
23 deletions
+216
-23
BUILD/SETUP.sh
BUILD/SETUP.sh
+1
-1
mysql-test/r/innodb.result
mysql-test/r/innodb.result
+0
-6
mysql-test/r/innodb_handler.result
mysql-test/r/innodb_handler.result
+139
-0
mysql-test/t/innodb.test
mysql-test/t/innodb.test
+1
-7
mysql-test/t/innodb_handler.test
mysql-test/t/innodb_handler.test
+69
-0
sql/ha_innodb.cc
sql/ha_innodb.cc
+0
-5
sql/ha_innodb.h
sql/ha_innodb.h
+2
-3
sql/handler.h
sql/handler.h
+2
-0
sql/sql_handler.cc
sql/sql_handler.cc
+2
-1
No files found.
BUILD/SETUP.sh
View file @
d99e50c8
...
...
@@ -48,7 +48,7 @@ fast_cflags="-O3 -fno-omit-frame-pointer"
# this is one is for someone who thinks 1% speedup is worth not being
# able to backtrace
reckless_cflags
=
"-O3 -fomit-frame-pointer "
debug_cflags
=
"-DEXTRA_DEBUG -DFORCE_INIT_OF_VARS -DSAFEMALLOC -DPEDANTIC_SAFEMALLOC -DSAFE_MUTEX -O1"
debug_cflags
=
"-D
UNIV_MUST_NOT_INLINE -D
EXTRA_DEBUG -DFORCE_INIT_OF_VARS -DSAFEMALLOC -DPEDANTIC_SAFEMALLOC -DSAFE_MUTEX -O1"
base_cxxflags
=
"-felide-constructors -fno-exceptions -fno-rtti"
...
...
mysql-test/r/innodb.result
View file @
d99e50c8
...
...
@@ -920,12 +920,6 @@ create table t1 (t int not null default 1, key (t)) type=innodb;
desc t1;
Field Type Null Key Default Extra
t int(11) MUL 1
handler t1 open t1;
Table handler for 't1' doesn't have this option
handler t1 read t first;
Unknown table 't1' in HANDLER
handler t1 close;
Unknown table 't1' in HANDLER
drop table t1;
CREATE TABLE t1 (
number bigint(20) NOT NULL default '0',
...
...
mysql-test/r/innodb_handler.result
0 → 100644
View file @
d99e50c8
drop table if exists t1;
create table t1 (a int, b char(10), key a(a), key b(a,b)) type=innodb;
insert into t1 values
(17,"ddd"),(18,"eee"),(19,"fff"),(19,"yyy"),
(14,"aaa"),(15,"bbb"),(16,"ccc"),(16,"xxx"),
(20,"ggg"),(21,"hhh"),(22,"iii");
handler t1 open as t2;
handler t2 read a first;
a b
14 aaa
handler t2 read a next;
a b
15 bbb
handler t2 read a next;
a b
16 ccc
handler t2 read a prev;
a b
15 bbb
handler t2 read a last;
a b
22 iii
handler t2 read a prev;
a b
21 hhh
handler t2 read a prev;
a b
20 ggg
handler t2 read a first;
a b
14 aaa
handler t2 read a prev;
a b
handler t2 read a last;
a b
22 iii
handler t2 read a prev;
a b
21 hhh
handler t2 read a next;
a b
22 iii
handler t2 read a next;
a b
handler t2 read a=(15);
a b
15 bbb
handler t2 read a=(16);
a b
16 ccc
handler t2 read a=(19,"fff");
Too many key parts specified. Max 1 parts allowed
handler t2 read b=(19,"fff");
a b
19 fff
handler t2 read b=(19,"yyy");
a b
19 yyy
handler t2 read b=(19);
a b
19 fff
handler t1 read a last;
Unknown table 't1' in HANDLER
handler t2 read a=(11);
a b
handler t2 read a>=(11);
a b
14 aaa
handler t2 read a=(18);
a b
18 eee
handler t2 read a>=(18);
a b
18 eee
handler t2 read a>(18);
a b
19 fff
handler t2 read a<=(18);
a b
18 eee
handler t2 read a<(18);
a b
17 ddd
handler t2 read a first limit 5;
a b
14 aaa
15 bbb
16 ccc
16 xxx
17 ddd
handler t2 read a next limit 3;
a b
18 eee
19 fff
19 yyy
handler t2 read a prev limit 10;
a b
19 fff
18 eee
17 ddd
16 xxx
16 ccc
15 bbb
14 aaa
handler t2 read a>=(16) limit 4;
a b
16 ccc
16 xxx
17 ddd
18 eee
handler t2 read a>=(16) limit 2,2;
a b
17 ddd
18 eee
handler t2 read a last limit 3;
a b
22 iii
21 hhh
20 ggg
handler t2 read a=(19);
a b
19 fff
handler t2 read a=(19) where b="yyy";
a b
19 yyy
handler t2 read first;
a b
17 ddd
handler t2 read next;
a b
18 eee
alter table t1 type=innodb;
handler t2 read next;
a b
19 fff
handler t2 read last;
You have an error in your SQL syntax near '' at line 1
handler t2 close;
drop table if exists t1;
mysql-test/t/innodb.test
View file @
d99e50c8
...
...
@@ -578,17 +578,11 @@ explain select a,b,c from t1;
drop
table
t1
;
#
# Check describe
& handler
# Check describe
#
create
table
t1
(
t
int
not
null
default
1
,
key
(
t
))
type
=
innodb
;
desc
t1
;
--
error
1031
handler
t1
open
t1
;
--
error
1109
handler
t1
read
t
first
;
--
error
1109
handler
t1
close
;
drop
table
t1
;
#
...
...
mysql-test/t/innodb_handler.test
0 → 100644
View file @
d99e50c8
--
source
include
/
have_innodb
.
inc
#
# test of HANDLER ...
#
drop
table
if
exists
t1
;
create
table
t1
(
a
int
,
b
char
(
10
),
key
a
(
a
),
key
b
(
a
,
b
))
type
=
innodb
;
insert
into
t1
values
(
17
,
"ddd"
),(
18
,
"eee"
),(
19
,
"fff"
),(
19
,
"yyy"
),
(
14
,
"aaa"
),(
15
,
"bbb"
),(
16
,
"ccc"
),(
16
,
"xxx"
),
(
20
,
"ggg"
),(
21
,
"hhh"
),(
22
,
"iii"
);
handler
t1
open
as
t2
;
handler
t2
read
a
first
;
handler
t2
read
a
next
;
handler
t2
read
a
next
;
handler
t2
read
a
prev
;
handler
t2
read
a
last
;
handler
t2
read
a
prev
;
handler
t2
read
a
prev
;
handler
t2
read
a
first
;
handler
t2
read
a
prev
;
handler
t2
read
a
last
;
handler
t2
read
a
prev
;
handler
t2
read
a
next
;
handler
t2
read
a
next
;
handler
t2
read
a
=
(
15
);
handler
t2
read
a
=
(
16
);
!
$
1070
handler
t2
read
a
=
(
19
,
"fff"
);
handler
t2
read
b
=
(
19
,
"fff"
);
handler
t2
read
b
=
(
19
,
"yyy"
);
handler
t2
read
b
=
(
19
);
!
$
1109
handler
t1
read
a
last
;
handler
t2
read
a
=
(
11
);
handler
t2
read
a
>=
(
11
);
handler
t2
read
a
=
(
18
);
handler
t2
read
a
>=
(
18
);
handler
t2
read
a
>
(
18
);
handler
t2
read
a
<=
(
18
);
handler
t2
read
a
<
(
18
);
handler
t2
read
a
first
limit
5
;
handler
t2
read
a
next
limit
3
;
handler
t2
read
a
prev
limit
10
;
handler
t2
read
a
>=
(
16
)
limit
4
;
handler
t2
read
a
>=
(
16
)
limit
2
,
2
;
handler
t2
read
a
last
limit
3
;
handler
t2
read
a
=
(
19
);
handler
t2
read
a
=
(
19
)
where
b
=
"yyy"
;
handler
t2
read
first
;
handler
t2
read
next
;
alter
table
t1
type
=
innodb
;
handler
t2
read
next
;
!
$
1064
handler
t2
read
last
;
handler
t2
close
;
drop
table
if
exists
t1
;
sql/ha_innodb.cc
View file @
d99e50c8
...
...
@@ -404,7 +404,6 @@ ha_innobase::update_thd(
return
(
0
);
}
#ifdef notdefined
/* The code here appears for documentational purposes only. Not used
or tested yet. Will be used in 4.1. */
/*********************************************************************
...
...
@@ -420,9 +419,6 @@ ha_innobase::init_table_handle_for_HANDLER(void)
{
row_prebuilt_t
*
prebuilt
;
ut_a
(
0
);
/* the code has not been used or tested yet; to prevent
inadvertent usage we assert an error here */
/* If current thd does not yet have a trx struct, create one.
If the current handle does not yet have a prebuilt struct, create
one. Update the trx pointers in the prebuilt struct. Normally
...
...
@@ -462,7 +458,6 @@ ha_innobase::init_table_handle_for_HANDLER(void)
prebuilt
->
read_just_key
=
FALSE
;
}
#endif
/*************************************************************************
Opens an InnoDB database. */
...
...
sql/ha_innodb.h
View file @
d99e50c8
...
...
@@ -76,7 +76,7 @@ class ha_innobase: public handler
ha_innobase
(
TABLE
*
table
)
:
handler
(
table
),
int_table_flags
(
HA_REC_NOT_IN_SEQ
|
HA_KEYPOS_TO_RNDPOS
|
HA_LASTKEY_ORDER
|
HA_NULL_KEY
|
HA_NULL_KEY
|
HA_CAN_SQL_HANDLER
|
HA_NOT_EXACT_COUNT
|
HA_NO_WRITE_DELAYED
|
HA_PRIMARY_KEY_IN_READ_INDEX
|
...
...
@@ -164,8 +164,7 @@ class ha_innobase: public handler
void
free_foreign_key_create_info
(
char
*
str
);
THR_LOCK_DATA
**
store_lock
(
THD
*
thd
,
THR_LOCK_DATA
**
to
,
enum
thr_lock_type
lock_type
);
/* void init_table_handle_for_HANDLER(); Not tested or used yet, code
included for documentational purposes only */
void
init_table_handle_for_HANDLER
();
longlong
get_auto_increment
();
};
...
...
sql/handler.h
View file @
d99e50c8
...
...
@@ -313,6 +313,8 @@ class handler :public Sql_alloc
virtual
void
append_create_info
(
String
*
packet
)
{}
virtual
char
*
get_foreign_key_create_info
()
{
return
(
NULL
);}
/* gets foreign key create string from InnoDB */
virtual
void
init_table_handle_for_HANDLER
()
{
return
;
}
/* prepare InnoDB for HANDLER */
virtual
void
free_foreign_key_create_info
(
char
*
str
)
{}
/* The following can be called without an open handler */
virtual
const
char
*
table_type
()
const
=
0
;
...
...
sql/sql_handler.cc
View file @
d99e50c8
...
...
@@ -117,6 +117,7 @@ int mysql_ha_read(THD *thd, TABLE_LIST *tables,
keyname
,
tables
->
name
);
return
-
1
;
}
table
->
file
->
index_init
(
keyno
);
}
List
<
Item
>
list
;
...
...
@@ -127,7 +128,7 @@ int mysql_ha_read(THD *thd, TABLE_LIST *tables,
insert_fields
(
thd
,
tables
,
tables
->
db
,
tables
->
name
,
&
it
);
table
->
file
->
in
dex_init
(
keyno
);
table
->
file
->
in
it_table_handle_for_HANDLER
();
// Only InnoDB requires it
select_limit
+=
offset_limit
;
send_fields
(
thd
,
list
,
1
);
...
...
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