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
6d1d8847
Commit
6d1d8847
authored
Sep 07, 2013
by
Andrew McDonnell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Partial fix for lp bug 1221722
parent
c2557f37
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
11 deletions
+12
-11
storage/oqgraph/ha_oqgraph.cc
storage/oqgraph/ha_oqgraph.cc
+11
-11
storage/oqgraph/ha_oqgraph.h
storage/oqgraph/ha_oqgraph.h
+1
-0
No files found.
storage/oqgraph/ha_oqgraph.cc
View file @
6d1d8847
...
...
@@ -398,7 +398,7 @@ int ha_oqgraph::oqgraph_check_table_structure (TABLE *table_arg)
push_warning_printf
(
current_thd
,
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
HA_WRONG_CREATE_OPTION
,
"Incorrect keys algorithm on key %d."
,
i
);
DBUG_RETURN
(
-
1
);
}
if
(
key
->
key_parts
==
3
)
if
(
key
->
user_defined_
key_parts
==
3
)
{
/* KEY (latch, origid, destid) USING HASH */
/* KEY (latch, destid, origid) USING HASH */
...
...
@@ -535,16 +535,16 @@ int ha_oqgraph::open(const char *name, int mode, uint test_if_locked)
share
->
normalized_path
.
str
,
share
->
path
.
length
));
while
(
open_table_def
(
thd
,
share
,
0
))
{
if
(
thd
->
is_error
()
&&
thd
->
stmt_da
->
sql_errno
()
!=
ER_NO_SUCH_TABLE
)
if
(
thd
->
is_error
()
&&
thd
->
get_stmt_da
()
->
sql_errno
()
!=
ER_NO_SUCH_TABLE
)
{
free_table_share
(
share
);
return
thd
->
stmt_da
->
sql_errno
();
return
thd
->
get_stmt_da
()
->
sql_errno
();
}
if
(
ha_create_table_from_engine
(
thd
,
table
->
s
->
db
.
str
,
options
->
table_name
))
{
free_table_share
(
share
);
return
thd
->
stmt_da
->
sql_errno
();
return
thd
->
get_stmt_da
()
->
sql_errno
();
}
/*mysql_reset_errors(thd, 1);*/
thd
->
clear_error
();
...
...
@@ -553,26 +553,26 @@ int ha_oqgraph::open(const char *name, int mode, uint test_if_locked)
if
(
int
err
=
share
->
error
)
{
open_table_error
(
share
,
share
->
error
,
share
->
open_errno
,
share
->
errarg
);
open_table_error
(
share
,
share
->
error
,
share
->
open_errno
);
free_table_share
(
share
);
return
err
;
}
if
(
share
->
is_view
)
{
open_table_error
(
share
,
1
,
EMFILE
,
0
);
open_table_error
(
share
,
OPEN_FRM_OPEN_ERROR
,
EMFILE
);
free_table_share
(
share
);
fprint_error
(
"VIEWs are not supported for an OQGRAPH backing store"
);
return
-
1
;
}
if
(
int
err
=
open_table_from_share
(
thd
,
share
,
""
,
if
(
enum
open_frm_error
err
=
open_table_from_share
(
thd
,
share
,
""
,
(
uint
)
(
HA_OPEN_KEYFILE
|
HA_OPEN_RNDFILE
|
HA_GET_INDEX
|
HA_TRY_READ_ONLY
),
READ_KEYINFO
|
COMPUTE_TYPES
|
EXTRA_RECORD
,
thd
->
open_options
,
edges
,
FALSE
))
{
open_table_error
(
share
,
err
,
EMFILE
,
0
);
open_table_error
(
share
,
err
,
EMFILE
);
free_table_share
(
share
);
return
-
1
;
}
...
...
@@ -717,7 +717,7 @@ void ha_oqgraph::update_key_stats()
if
(
key
->
algorithm
!=
HA_KEY_ALG_BTREE
)
{
if
(
key
->
flags
&
HA_NOSAME
)
key
->
rec_per_key
[
key
->
key_parts
-
1
]
=
1
;
key
->
rec_per_key
[
key
->
user_defined_
key_parts
-
1
]
=
1
;
else
{
//unsigned vertices= graph->vertices_count();
...
...
@@ -726,7 +726,7 @@ void ha_oqgraph::update_key_stats()
//if (no_records < 2)
uint
no_records
=
2
;
key
->
rec_per_key
[
key
->
key_parts
-
1
]
=
no_records
;
key
->
rec_per_key
[
key
->
user_defined_
key_parts
-
1
]
=
no_records
;
}
}
}
...
...
@@ -1192,7 +1192,7 @@ ha_rows ha_oqgraph::records_in_range(uint inx, key_range *min_key,
/* Assert that info() did run. We need current statistics here. */
//DBUG_ASSERT(key_stat_version == share->key_stat_version);
//ha_rows result= key->rec_per_key[key->key_parts-1];
//ha_rows result= key->rec_per_key[key->
user_defined_
key_parts-1];
ha_rows
result
=
10
;
DBUG_PRINT
(
"oq-debug"
,
(
"records_in_range ::>> N=%u"
,
(
unsigned
)
result
));
...
...
storage/oqgraph/ha_oqgraph.h
View file @
6d1d8847
...
...
@@ -70,6 +70,7 @@ public:
/* Rows also use a fixed-size format */
enum
row_type
get_row_type
()
const
{
return
ROW_TYPE_FIXED
;
}
ulong
index_flags
(
uint
inx
,
uint
part
,
bool
all_parts
)
const
;
const
char
**
bas_ext
()
const
;
uint
max_supported_keys
()
const
{
return
MAX_KEY
;
}
uint
max_supported_key_part_length
()
const
{
return
MAX_KEY_LENGTH
;
}
double
scan_time
()
{
return
(
double
)
1000000000
;
}
...
...
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