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
27c9ed11
Commit
27c9ed11
authored
Sep 21, 2013
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TokuDB now compiles and passes all tests as in 5.5
parent
9af17704
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
42 additions
and
26 deletions
+42
-26
storage/tokudb/ha_tokudb.cc
storage/tokudb/ha_tokudb.cc
+2
-2
storage/tokudb/ha_tokudb.h
storage/tokudb/ha_tokudb.h
+16
-4
storage/tokudb/ha_tokudb_mrr_maria.cc
storage/tokudb/ha_tokudb_mrr_maria.cc
+4
-0
storage/tokudb/hatoku_cmp.cc
storage/tokudb/hatoku_cmp.cc
+3
-3
storage/tokudb/hatoku_cmp.h
storage/tokudb/hatoku_cmp.h
+1
-1
storage/tokudb/hatoku_hton.cc
storage/tokudb/hatoku_hton.cc
+2
-2
storage/tokudb/mysql-test/tokudb/r/type_blob.result
storage/tokudb/mysql-test/tokudb/r/type_blob.result
+2
-2
storage/tokudb/mysql-test/tokudb/r/type_newdecimal.result
storage/tokudb/mysql-test/tokudb/r/type_newdecimal.result
+1
-1
storage/tokudb/mysql-test/tokudb/t/type_blob.test
storage/tokudb/mysql-test/tokudb/t/type_blob.test
+2
-2
storage/tokudb/mysql-test/tokudb_bugs/r/2970.result
storage/tokudb/mysql-test/tokudb_bugs/r/2970.result
+1
-1
storage/tokudb/mysql-test/tokudb_bugs/r/5469.result
storage/tokudb/mysql-test/tokudb_bugs/r/5469.result
+2
-2
storage/tokudb/mysql-test/tokudb_bugs/r/6684.result
storage/tokudb/mysql-test/tokudb_bugs/r/6684.result
+2
-2
storage/tokudb/mysql-test/tokudb_bugs/r/checkpoint_lock.result
...ge/tokudb/mysql-test/tokudb_bugs/r/checkpoint_lock.result
+1
-1
storage/tokudb/mysql-test/tokudb_bugs/r/checkpoint_lock_2.result
.../tokudb/mysql-test/tokudb_bugs/r/checkpoint_lock_2.result
+3
-3
No files found.
storage/tokudb/ha_tokudb.cc
View file @
27c9ed11
...
...
@@ -369,7 +369,7 @@ static inline bool do_ignore_flag_optimization(THD* thd, TABLE* table, bool opt_
}
static
inline
uint
get_key_parts
(
const
KEY
*
key
)
{
#if 50609 <= MYSQL_VERSION_ID
&& MYSQL_VERSION_ID <= 50699
#if 50609 <= MYSQL_VERSION_ID
return
key
->
user_defined_key_parts
;
#else
return
key
->
key_parts
;
...
...
@@ -1733,7 +1733,7 @@ int ha_tokudb::initialize_share(
goto
exit
;
}
#if defined(MARIADB_BASE_VERSION)
&& MYSQL_VERSION_ID < 100004
#if defined(MARIADB_BASE_VERSION)
// a hack to support frm-only ALTER TABLE in MariaDB 5.5
// in 10.0 there's a proper fix with the new discovery and online alter
if
(
thd_sql_command
(
thd
)
==
SQLCOM_ALTER_TABLE
)
{
...
...
storage/tokudb/ha_tokudb.h
View file @
27c9ed11
...
...
@@ -615,8 +615,9 @@ class ha_tokudb : public handler {
int
cmp_ref
(
const
uchar
*
ref1
,
const
uchar
*
ref2
);
bool
check_if_incompatible_data
(
HA_CREATE_INFO
*
info
,
uint
table_changes
);
// MariaDB MRR introduced in 5.5
#ifdef MARIADB_BASE_VERSION
// MariaDB MRR introduced in 5.5
#if MYSQL_VERSION_ID < 50600
int
multi_range_read_init
(
RANGE_SEQ_IF
*
seq
,
void
*
seq_init_param
,
uint
n_ranges
,
uint
mode
,
...
...
@@ -631,10 +632,21 @@ class ha_tokudb : public handler {
uint
*
flags
,
COST_VECT
*
cost
);
int
multi_range_read_explain_info
(
uint
mrr_mode
,
char
*
str
,
size_t
size
);
#else
// MariaDB MRR introduced in 10.0
int
multi_range_read_init
(
RANGE_SEQ_IF
*
seq
,
void
*
seq_init_param
,
uint
n_ranges
,
uint
mode
,
HANDLER_BUFFER
*
buf
);
int
multi_range_read_next
(
range_id_t
*
range_info
);
ha_rows
multi_range_read_info_const
(
uint
keyno
,
RANGE_SEQ_IF
*
seq
,
void
*
seq_init_param
,
uint
n_ranges
,
uint
*
bufsz
,
uint
*
flags
,
Cost_estimate
*
cost
);
ha_rows
multi_range_read_info
(
uint
keyno
,
uint
n_ranges
,
uint
keys
,
uint
key_parts
,
uint
*
bufsz
,
uint
*
flags
,
Cost_estimate
*
cost
);
int
multi_range_read_explain_info
(
uint
mrr_mode
,
char
*
str
,
size_t
size
);
#endif
// MariaDB MRR introduced in 5.6
#if !defined(MARIADB_BASE_VERSION)
#else
// MySQL MRR introduced in 5.6
#if 50600 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50699
int
multi_range_read_init
(
RANGE_SEQ_IF
*
seq
,
void
*
seq_init_param
,
uint
n_ranges
,
uint
mode
,
HANDLER_BUFFER
*
buf
);
...
...
storage/tokudb/ha_tokudb_mrr_maria.cc
View file @
27c9ed11
...
...
@@ -94,6 +94,10 @@ PATENT RIGHTS GRANT:
/**
* Multi Range Read interface, DS-MRR calls
*/
#if MYSQL_VERSION_ID >= 100000
#define COST_VECT Cost_estimate
#endif
int
ha_tokudb
::
multi_range_read_init
(
RANGE_SEQ_IF
*
seq
,
void
*
seq_init_param
,
uint
n_ranges
,
uint
mode
,
...
...
storage/tokudb/hatoku_cmp.cc
View file @
27c9ed11
...
...
@@ -116,7 +116,7 @@ bool field_valid_for_tokudb_table(Field* field) {
case
MYSQL_TYPE_TIMESTAMP
:
case
MYSQL_TYPE_DOUBLE
:
case
MYSQL_TYPE_FLOAT
:
#if 50600 <= MYSQL_VERSION_ID
&& MYSQL_VERSION_ID <= 50699
#if 50600 <= MYSQL_VERSION_ID
case
MYSQL_TYPE_DATETIME2
:
case
MYSQL_TYPE_TIMESTAMP2
:
case
MYSQL_TYPE_TIME2
:
...
...
@@ -263,7 +263,7 @@ TOKU_TYPE mysql_to_toku_type (Field* field) {
case
MYSQL_TYPE_FLOAT
:
ret_val
=
toku_type_float
;
goto
exit
;
#if 50600 <= MYSQL_VERSION_ID
&& MYSQL_VERSION_ID <= 50699
#if 50600 <= MYSQL_VERSION_ID
case
MYSQL_TYPE_DATETIME2
:
case
MYSQL_TYPE_TIMESTAMP2
:
case
MYSQL_TYPE_TIME2
:
...
...
@@ -3199,7 +3199,7 @@ bool fields_are_same_type(
case
MYSQL_TYPE_NEWDATE
:
case
MYSQL_TYPE_TIME
:
case
MYSQL_TYPE_TIMESTAMP
:
#if 50600 <= MYSQL_VERSION_ID
&& MYSQL_VERSION_ID <= 50699
#if 50600 <= MYSQL_VERSION_ID
case
MYSQL_TYPE_DATETIME2
:
case
MYSQL_TYPE_TIMESTAMP2
:
case
MYSQL_TYPE_TIME2
:
...
...
storage/tokudb/hatoku_cmp.h
View file @
27c9ed11
...
...
@@ -262,7 +262,7 @@ static inline const uchar* unpack_toku_field_blob(
}
static
inline
uint
get_null_offset
(
TABLE
*
table
,
Field
*
field
)
{
#if 50606 <= MYSQL_VERSION_ID
&& MYSQL_VERSION_ID <= 50699
#if 50606 <= MYSQL_VERSION_ID
return
field
->
null_offset
(
table
->
record
[
0
]);
#else
return
(
uint
)
((
uchar
*
)
field
->
null_ptr
-
(
uchar
*
)
table
->
record
[
0
]);
...
...
storage/tokudb/hatoku_hton.cc
View file @
27c9ed11
...
...
@@ -316,7 +316,7 @@ static void tokudb_cleanup_log_files(void);
static
int
tokudb_end
(
handlerton
*
hton
,
ha_panic_function
type
);
static
bool
tokudb_flush_logs
(
handlerton
*
hton
);
static
bool
tokudb_show_status
(
handlerton
*
hton
,
THD
*
thd
,
stat_print_fn
*
print
,
enum
ha_stat_type
);
static
void
tokudb_handle_fatal_signal
(
handlerton
*
hton
,
THD
*
thd
,
int
sig
);
static
void
tokudb_handle_fatal_signal
(
handlerton
*
hton
,
THD
*
thd
,
int
sig
)
__attribute__
((
__unused__
))
;
static
int
tokudb_close_connection
(
handlerton
*
hton
,
THD
*
thd
);
static
int
tokudb_commit
(
handlerton
*
hton
,
THD
*
thd
,
bool
all
);
static
int
tokudb_rollback
(
handlerton
*
hton
,
THD
*
thd
,
bool
all
);
...
...
@@ -331,7 +331,7 @@ static int tokudb_rollback_to_savepoint(handlerton * hton, THD * thd, void *save
static
int
tokudb_savepoint
(
handlerton
*
hton
,
THD
*
thd
,
void
*
savepoint
);
static
int
tokudb_release_savepoint
(
handlerton
*
hton
,
THD
*
thd
,
void
*
savepoint
);
static
int
tokudb_discover_table
(
handlerton
*
hton
,
THD
*
thd
,
TABLE_SHARE
*
ts
);
static
int
tokudb_discover
(
handlerton
*
hton
,
THD
*
thd
,
const
char
*
db
,
const
char
*
name
,
uchar
**
frmblob
,
size_t
*
frmlen
);
static
int
tokudb_discover
(
handlerton
*
hton
,
THD
*
thd
,
const
char
*
db
,
const
char
*
name
,
uchar
**
frmblob
,
size_t
*
frmlen
)
__attribute__
((
__unused__
))
;
static
int
tokudb_discover2
(
handlerton
*
hton
,
THD
*
thd
,
const
char
*
db
,
const
char
*
name
,
bool
translate_name
,
uchar
**
frmblob
,
size_t
*
frmlen
);
static
int
tokudb_discover3
(
handlerton
*
hton
,
THD
*
thd
,
const
char
*
db
,
const
char
*
name
,
char
*
path
,
uchar
**
frmblob
,
size_t
*
frmlen
);
handlerton
*
tokudb_hton
;
...
...
storage/tokudb/mysql-test/tokudb/r/type_blob.result
View file @
27c9ed11
...
...
@@ -233,7 +233,7 @@ HELLO
HELLO MY
a
hello
set
option sql_
big_tables=1;
set big_tables=1;
select distinct t from t1;
t
NULL
...
...
@@ -314,7 +314,7 @@ HELLO
HELLO MY
a
hello
set
option sql_
big_tables=0;
set big_tables=0;
select distinct * from t1;
t c b d
NULL NULL NULL NULL
...
...
storage/tokudb/mysql-test/tokudb/r/type_newdecimal.result
View file @
27c9ed11
...
...
@@ -681,7 +681,7 @@ select 0.8 = 0.7 + 0.1;
1
drop table if exists t1;
Warnings:
Note 1051 Unknown table 't1'
Note 1051 Unknown table 't
est.t
1'
create table t1 (col1 decimal(38));
insert into t1 values (12345678901234567890123456789012345678);
select * from t1;
...
...
storage/tokudb/mysql-test/tokudb/t/type_blob.test
View file @
27c9ed11
...
...
@@ -112,7 +112,7 @@ select distinct t from t1 order by t;
select
distinct
b
from
t1
order
by
b
;
select
t
from
t1
group
by
t
;
select
b
from
t1
group
by
b
;
set
option
sql_
big_tables
=
1
;
set
big_tables
=
1
;
select
distinct
t
from
t1
;
select
distinct
b
from
t1
;
select
distinct
t
from
t1
order
by
t
;
...
...
@@ -123,7 +123,7 @@ select distinct c from t1 order by c;
select
distinct
d
from
t1
order
by
d
;
select
c
from
t1
group
by
c
;
select
d
from
t1
group
by
d
;
set
option
sql_
big_tables
=
0
;
set
big_tables
=
0
;
select
distinct
*
from
t1
;
select
t
,
count
(
*
)
from
t1
group
by
t
;
select
b
,
count
(
*
)
from
t1
group
by
b
;
...
...
storage/tokudb/mysql-test/tokudb_bugs/r/2970.result
View file @
27c9ed11
drop table if exists t2970;
Warnings:
Note 1051 Unknown table 't2970'
Note 1051 Unknown table 't
est.t
2970'
create table t2970 (a int, b int, c int, d int, key(a), key(a,b));
insert into t2970 values (1,1,1,1),(1,2,3,4);
explain select a,count(b),max(b) from t2970 where a > 0 group by a order by a;
...
...
storage/tokudb/mysql-test/tokudb_bugs/r/5469.result
View file @
27c9ed11
...
...
@@ -7,14 +7,14 @@ ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
SELECT * FROM t1;
ERROR 42S02: Table 'test.t1' doesn't exist
DROP TABLE t1;
ERROR 42S02: Unknown table 't1'
ERROR 42S02: Unknown table 't
est.t
1'
SET AUTOCOMMIT = 0;
CREATE TABLE t1 (PRIMARY KEY (a)) SELECT 1 AS a UNION ALL SELECT 1;
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
SELECT * FROM t1;
ERROR 42S02: Table 'test.t1' doesn't exist
DROP TABLE t1;
ERROR 42S02: Unknown table 't1'
ERROR 42S02: Unknown table 't
est.t
1'
create table t1 (a int, b int) engine=MyISAM;
insert into t1 values (1,1),(1,2);
alter table t1 engine=TokuDB, add unique key (a);
...
...
storage/tokudb/mysql-test/tokudb_bugs/r/6684.result
View file @
27c9ed11
use test;
drop table if exists site;
Warnings:
Note 1051 Unknown table 'site'
Note 1051 Unknown table '
test.
site'
drop table if exists screenshot;
Warnings:
Note 1051 Unknown table 'screenshot'
Note 1051 Unknown table '
test.
screenshot'
CREATE TABLE `site` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(200) NOT NULL DEFAULT '',
...
...
storage/tokudb/mysql-test/tokudb_bugs/r/checkpoint_lock.result
View file @
27c9ed11
...
...
@@ -15,6 +15,6 @@ flush logs;;
select DB, command, state, info from information_schema.processlist;
DB command state info
test Query executing select DB, command, state, info from information_schema.processlist
test Query
NULL
flush logs
test Query
init
flush logs
set tokudb_checkpoint_lock=0;
set global tokudb_checkpoint_on_flush_logs=OFF;
storage/tokudb/mysql-test/tokudb_bugs/r/checkpoint_lock_2.result
View file @
27c9ed11
...
...
@@ -21,21 +21,21 @@ select DB, command, state, info from information_schema.processlist;
DB command state info
test Query executing select DB, command, state, info from information_schema.processlist
test Sleep NULL
test Query
NULL
flush logs
test Query
init
flush logs
set session tokudb_checkpoint_lock=1;
# should still see a flush logs
select DB, command, state, info from information_schema.processlist;
DB command state info
test Query executing select DB, command, state, info from information_schema.processlist
test Sleep NULL
test Query
NULL
flush logs
test Query
init
flush logs
set session tokudb_checkpoint_lock=0;
# should still see a flush logs
select DB, command, state, info from information_schema.processlist;
DB command state info
test Sleep NULL
test Query executing select DB, command, state, info from information_schema.processlist
test Query
NULL
flush logs
test Query
init
flush logs
set session tokudb_checkpoint_lock=0;
# should see nothing
select DB, command, state, info from information_schema.processlist;
...
...
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