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
9d2d4036
Commit
9d2d4036
authored
Feb 27, 2020
by
Will DeVries
Committed by
Sergei Petrunia
Mar 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove spaces from the ends of lines.
parent
7d6af8f5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
24 deletions
+24
-24
storage/xpand/ha_xpand.cc
storage/xpand/ha_xpand.cc
+17
-17
storage/xpand/ha_xpand_pushdown.h
storage/xpand/ha_xpand_pushdown.h
+2
-2
storage/xpand/xpand_connection.cc
storage/xpand/xpand_connection.cc
+4
-4
storage/xpand/xpand_connection.h
storage/xpand/xpand_connection.h
+1
-1
No files found.
storage/xpand/ha_xpand.cc
View file @
9d2d4036
...
...
@@ -232,7 +232,7 @@ uint row_buffer_setting(THD* thd)
/*
Get an Xpand_share object for this object. If it doesn't yet exist, create
Get an Xpand_share object for this object. If it doesn't yet exist, create
it.
*/
...
...
@@ -275,28 +275,28 @@ size_t estimate_row_size(TABLE *table)
/*
Try to decode a string from filename encoding, if that fails, return the
Try to decode a string from filename encoding, if that fails, return the
original string.
@detail
This is used to get table (or database) name from file (or directory)
name. Names of regular tables/databases are encoded using
This is used to get table (or database) name from file (or directory)
name. Names of regular tables/databases are encoded using
my_charset_filename encoding.
Names of temporary tables are not encoded, and they start with '#sql'
Names of temporary tables are not encoded, and they start with '#sql'
which is not a valid character sequence in my_charset_filename encoding.
Our way to talkle this is to
1. Try to convert the name back
2. If that failed, assume it's a temporary object name and just use the
2. If that failed, assume it's a temporary object name and just use the
name.
*/
static
void
decode_object_or_tmp_name
(
const
char
*
from
,
uint
size
,
static
void
decode_object_or_tmp_name
(
const
char
*
from
,
uint
size
,
std
::
string
*
out
)
{
uint
errors
,
new_size
;
out
->
resize
(
size
+
1
);
// assume the decoded string is not longer
new_size
=
strconvert
(
&
my_charset_filename
,
from
,
size
,
system_charset_info
,
(
char
*
)
out
->
c_str
(),
size
+
1
,
system_charset_info
,
(
char
*
)
out
->
c_str
(),
size
+
1
,
&
errors
);
if
(
errors
)
out
->
assign
(
from
,
size
);
...
...
@@ -307,7 +307,7 @@ static void decode_object_or_tmp_name(const char *from, uint size,
/*
Take a "./db_name/table_name" and extract db_name and table_name from it
@return
@return
0 OK
other Error code
*/
...
...
@@ -330,9 +330,9 @@ static int normalize_tablename(const char *db_table,
DBUG_ASSERT
(
0
);
// We were not passed table name?
return
HA_ERR_INTERNAL_ERROR
;
}
decode_object_or_tmp_name
(
tablename
.
c_str
()
+
2
,
pos
-
2
,
norm_db
);
decode_object_or_tmp_name
(
tablename
.
c_str
()
+
pos
+
1
,
decode_object_or_tmp_name
(
tablename
.
c_str
()
+
pos
+
1
,
tablename
.
size
()
-
(
pos
+
1
),
norm_table
);
return
0
;
}
...
...
@@ -410,7 +410,7 @@ int ha_xpand::create(const char *name, TABLE *form, HA_CREATE_INFO *info)
TABLE_LIST
table_list
;
memset
(
&
table_list
,
0
,
sizeof
(
table_list
));
table_list
.
table
=
form
;
error_code
=
show_create_table_ex
(
thd
,
&
table_list
,
error_code
=
show_create_table_ex
(
thd
,
&
table_list
,
norm_db
.
c_str
(),
norm_table
.
c_str
(),
&
create_table_stmt
,
create_info
,
WITH_DB_NAME
);
if
(
!
is_tmp_table
)
...
...
@@ -432,9 +432,9 @@ int ha_xpand::create(const char *name, TABLE *form, HA_CREATE_INFO *info)
error_code
=
trx
->
run_query
(
create_table_stmt
);
if
(
error_code
)
return
error_code
;
// Load the oid of the created table
error_code
=
trx
->
get_table_oid
(
norm_db
,
norm_table
,
&
xpand_table_oid
,
error_code
=
trx
->
get_table_oid
(
norm_db
,
norm_table
,
&
xpand_table_oid
,
table_share
);
return
error_code
;
...
...
@@ -480,7 +480,7 @@ int ha_xpand::rename_table(const char* from, const char* to)
std
::
string
decoded_to_dbname
;
std
::
string
decoded_to_tbname
;
if
((
error_code
=
normalize_tablename
(
to
,
&
decoded_to_dbname
,
if
((
error_code
=
normalize_tablename
(
to
,
&
decoded_to_dbname
,
&
decoded_to_tbname
)))
return
error_code
;
...
...
@@ -557,8 +557,8 @@ int ha_xpand::open(const char *name, int mode, uint test_if_locked)
std
::
string
norm_db
;
if
((
error_code
=
normalize_tablename
(
name
,
&
norm_db
,
&
norm_table
)))
DBUG_RETURN
(
error_code
);
error_code
=
trx
->
get_table_oid
(
norm_db
,
norm_table
,
&
xpand_table_oid
,
error_code
=
trx
->
get_table_oid
(
norm_db
,
norm_table
,
&
xpand_table_oid
,
table_share
);
if
(
error_code
)
DBUG_RETURN
(
error_code
);
...
...
storage/xpand/ha_xpand_pushdown.h
View file @
9d2d4036
...
...
@@ -40,8 +40,8 @@ class ha_xpand_base_handler
* More details in server/sql/select_handler.h
* sel semantic tree for the query in SELECT_LEX.
************************************************************/
class
ha_xpand_select_handler
:
private
ha_xpand_base_handler
,
class
ha_xpand_select_handler
:
private
ha_xpand_base_handler
,
public
select_handler
{
public:
...
...
storage/xpand/xpand_connection.cc
View file @
9d2d4036
...
...
@@ -1018,13 +1018,13 @@ int xpand_connection::populate_table_list(LEX_CSTRING *db,
update Xpand_share::xpand_table_oid.
@return
0 - OK
0 - OK
error code if an error occurred
*/
int
xpand_connection
::
get_table_oid
(
const
std
::
string
&
db
,
const
std
::
string
&
name
,
ulonglong
*
oid
,
int
xpand_connection
::
get_table_oid
(
const
std
::
string
&
db
,
const
std
::
string
&
name
,
ulonglong
*
oid
,
TABLE_SHARE
*
share
)
{
MYSQL_ROW
row
;
...
...
storage/xpand/xpand_connection.h
View file @
9d2d4036
...
...
@@ -110,7 +110,7 @@ class xpand_connection
int
scan_end
(
xpand_connection_cursor
*
scan
);
int
populate_table_list
(
LEX_CSTRING
*
db
,
handlerton
::
discovered_list
*
result
);
int
get_table_oid
(
const
std
::
string
&
db
,
const
std
::
string
&
name
,
int
get_table_oid
(
const
std
::
string
&
db
,
const
std
::
string
&
name
,
ulonglong
*
oid
,
TABLE_SHARE
*
share
);
int
discover_table_details
(
LEX_CSTRING
*
db
,
LEX_CSTRING
*
name
,
THD
*
thd
,
TABLE_SHARE
*
share
);
...
...
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