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
ff60d07c
Commit
ff60d07c
authored
Feb 13, 2020
by
Will DeVries
Committed by
Sergei Petrunia
Mar 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix more spacing issues and formatting issues.
parent
e176abf3
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
124 additions
and
132 deletions
+124
-132
storage/xpand/ha_xpand.cc
storage/xpand/ha_xpand.cc
+47
-50
storage/xpand/ha_xpand_pushdown.cc
storage/xpand/ha_xpand_pushdown.cc
+34
-35
storage/xpand/ha_xpand_pushdown.h
storage/xpand/ha_xpand_pushdown.h
+29
-30
storage/xpand/xpand_connection.cc
storage/xpand/xpand_connection.cc
+14
-17
No files found.
storage/xpand/ha_xpand.cc
View file @
ff60d07c
...
@@ -489,8 +489,7 @@ int ha_xpand::write_row(const uchar *buf)
...
@@ -489,8 +489,7 @@ int ha_xpand::write_row(const uchar *buf)
/* XXX: Xpand may needs to return HA_ERR_AUTOINC_ERANGE if we hit that
/* XXX: Xpand may needs to return HA_ERR_AUTOINC_ERANGE if we hit that
error. */
error. */
ulonglong
last_insert_id
=
0
;
ulonglong
last_insert_id
=
0
;
if
((
error_code
=
trx
->
write_row
(
xpand_table_oid
,
if
((
error_code
=
trx
->
write_row
(
xpand_table_oid
,
packed_new_row
,
packed_size
,
packed_new_row
,
packed_size
,
&
last_insert_id
)))
&
last_insert_id
)))
goto
err
;
goto
err
;
...
@@ -687,8 +686,7 @@ int ha_xpand::info(uint flag)
...
@@ -687,8 +686,7 @@ int ha_xpand::info(uint flag)
if
(
stats
.
records
==
0
)
if
(
stats
.
records
==
0
)
stats
.
mean_rec_length
=
0
;
stats
.
mean_rec_length
=
0
;
else
else
stats
.
mean_rec_length
=
(
ulong
)
stats
.
mean_rec_length
=
(
ulong
)
(
stats
.
data_file_length
/
stats
.
records
);
(
stats
.
data_file_length
/
stats
.
records
);
}
}
if
(
flag
&
HA_STATUS_CONST
)
if
(
flag
&
HA_STATUS_CONST
)
...
@@ -780,8 +778,7 @@ int ha_xpand::index_read(uchar * buf, const uchar * key, uint key_len,
...
@@ -780,8 +778,7 @@ int ha_xpand::index_read(uchar * buf, const uchar * key, uint key_len,
table
->
read_set
,
packed_key
,
packed_key_len
,
table
->
read_set
,
packed_key
,
packed_key_len
,
&
rowdata
,
&
rowdata_length
);
&
rowdata
,
&
rowdata_length
);
if
(
!
error_code
)
if
(
!
error_code
)
error_code
=
unpack_row_to_buf
(
rgi
,
table
,
buf
,
rowdata
,
error_code
=
unpack_row_to_buf
(
rgi
,
table
,
buf
,
rowdata
,
table
->
read_set
,
table
->
read_set
,
rowdata
+
rowdata_length
);
rowdata
+
rowdata_length
);
}
else
{
}
else
{
is_scan
=
true
;
is_scan
=
true
;
...
...
storage/xpand/ha_xpand_pushdown.cc
View file @
ff60d07c
...
@@ -30,7 +30,8 @@ extern uint xpand_row_buffer;
...
@@ -30,7 +30,8 @@ extern uint xpand_row_buffer;
* metadata_size int or -1 in case of error
* metadata_size int or -1 in case of error
************************************************************/
************************************************************/
int
get_field_types
(
THD
*
thd
,
TABLE
*
table__
,
SELECT_LEX
*
sl
,
uchar
*
fieldtype
,
int
get_field_types
(
THD
*
thd
,
TABLE
*
table__
,
SELECT_LEX
*
sl
,
uchar
*
fieldtype
,
uchar
*
field_metadata
,
uchar
*
null_bits
,
const
int
num_null_bytes
,
const
uint
fields_count
)
uchar
*
field_metadata
,
uchar
*
null_bits
,
const
int
num_null_bytes
,
const
uint
fields_count
)
{
{
int
field_metadata_size
=
0
;
int
field_metadata_size
=
0
;
int
metadata_index
=
0
;
int
metadata_index
=
0
;
...
@@ -85,7 +86,6 @@ int get_field_types(THD *thd, TABLE *table__, SELECT_LEX *sl, uchar *fieldtype,
...
@@ -85,7 +86,6 @@ int get_field_types(THD *thd, TABLE *table__, SELECT_LEX *sl, uchar *fieldtype,
return
field_metadata_size
;
return
field_metadata_size
;
}
}
/*@brief create_xpand_select_handler- Creates handler*/
/*@brief create_xpand_select_handler- Creates handler*/
/************************************************************
/************************************************************
* DESCRIPTION:
* DESCRIPTION:
...
@@ -144,7 +144,8 @@ create_xpand_select_handler(THD* thd, SELECT_LEX* select_lex)
...
@@ -144,7 +144,8 @@ create_xpand_select_handler(THD* thd, SELECT_LEX* select_lex)
}
}
if
((
field_metadata_size
=
if
((
field_metadata_size
=
get_field_types
(
thd
,
NULL
,
select_lex
,
fieldtype
,
field_metadata
,
null_bits
,
num_null_bytes
,
items_number
))
<
0
)
{
get_field_types
(
thd
,
NULL
,
select_lex
,
fieldtype
,
field_metadata
,
null_bits
,
num_null_bytes
,
items_number
))
<
0
)
{
goto
err
;
goto
err
;
}
}
...
@@ -343,9 +344,6 @@ ha_xpand_derived_handler::ha_xpand_derived_handler(
...
@@ -343,9 +344,6 @@ ha_xpand_derived_handler::ha_xpand_derived_handler(
ha_xpand_derived_handler
::~
ha_xpand_derived_handler
()
ha_xpand_derived_handler
::~
ha_xpand_derived_handler
()
{
{
int
error_code
;
int
error_code
;
xpand_connection
*
trx
=
get_trx
(
thd
,
&
error_code
);
xpand_connection
*
trx
=
get_trx
(
thd
,
&
error_code
);
if
(
!
trx
)
{
if
(
!
trx
)
{
// TBD Log this.
// TBD Log this.
...
@@ -395,7 +393,8 @@ int ha_xpand_derived_handler::init_scan()
...
@@ -395,7 +393,8 @@ int ha_xpand_derived_handler::init_scan()
}
}
if
((
field_metadata_size
=
if
((
field_metadata_size
=
get_field_types
(
thd__
,
table
,
select
,
fieldtype
,
field_metadata
,
null_bits
,
num_null_bytes
,
items_number
))
<
0
)
{
get_field_types
(
thd__
,
table
,
select
,
fieldtype
,
field_metadata
,
null_bits
,
num_null_bytes
,
items_number
))
<
0
)
{
goto
err
;
goto
err
;
}
}
...
...
storage/xpand/ha_xpand_pushdown.h
View file @
ff60d07c
...
@@ -16,7 +16,7 @@ Copyright (c) 2019, MariaDB Corporation.
...
@@ -16,7 +16,7 @@ Copyright (c) 2019, MariaDB Corporation.
class
ha_xpand_base_handler
class
ha_xpand_base_handler
{
{
// To simulate abstract class
// To simulate abstract class
protected:
protected:
ha_xpand_base_handler
()
:
thd__
(
0
),
table__
(
0
)
{}
ha_xpand_base_handler
()
:
thd__
(
0
),
table__
(
0
)
{}
~
ha_xpand_base_handler
()
{}
~
ha_xpand_base_handler
()
{}
...
@@ -44,7 +44,7 @@ class ha_xpand_select_handler:
...
@@ -44,7 +44,7 @@ class ha_xpand_select_handler:
private
ha_xpand_base_handler
,
private
ha_xpand_base_handler
,
public
select_handler
public
select_handler
{
{
public:
public:
ha_xpand_select_handler
(
THD
*
thd_arg
,
SELECT_LEX
*
sel
,
ha_xpand_select_handler
(
THD
*
thd_arg
,
SELECT_LEX
*
sel
,
xpand_connection_cursor
*
scan
);
xpand_connection_cursor
*
scan
);
~
ha_xpand_select_handler
();
~
ha_xpand_select_handler
();
...
@@ -67,7 +67,7 @@ class ha_xpand_derived_handler:
...
@@ -67,7 +67,7 @@ class ha_xpand_derived_handler:
private
ha_xpand_base_handler
,
private
ha_xpand_base_handler
,
public
derived_handler
public
derived_handler
{
{
public:
public:
ha_xpand_derived_handler
(
THD
*
thd_arg
,
SELECT_LEX
*
sel
,
ha_xpand_derived_handler
(
THD
*
thd_arg
,
SELECT_LEX
*
sel
,
xpand_connection_cursor
*
scan
);
xpand_connection_cursor
*
scan
);
~
ha_xpand_derived_handler
();
~
ha_xpand_derived_handler
();
...
@@ -78,7 +78,6 @@ class ha_xpand_derived_handler:
...
@@ -78,7 +78,6 @@ class ha_xpand_derived_handler:
void
print_error
(
int
,
unsigned
long
)
{}
void
print_error
(
int
,
unsigned
long
)
{}
};
};
select_handler
*
create_xpand_select_handler
(
THD
*
thd
,
SELECT_LEX
*
select_lex
);
select_handler
*
create_xpand_select_handler
(
THD
*
thd
,
SELECT_LEX
*
select_lex
);
derived_handler
*
create_xpand_derived_handler
(
THD
*
thd
,
TABLE_LIST
*
derived
);
derived_handler
*
create_xpand_derived_handler
(
THD
*
thd
,
TABLE_LIST
*
derived
);
...
...
storage/xpand/xpand_connection.cc
View file @
ff60d07c
...
@@ -240,8 +240,7 @@ int xpand_connection::send_command()
...
@@ -240,8 +240,7 @@ int xpand_connection::send_command()
if
(
com_error
)
if
(
com_error
)
{
{
int
error_code
=
mysql_errno
(
&
xpand_net
);
int
error_code
=
mysql_errno
(
&
xpand_net
);
my_printf_error
(
error_code
,
my_printf_error
(
error_code
,
"Xpand error: %s"
,
MYF
(
0
),
"Xpand error: %s"
,
MYF
(
0
),
mysql_error
(
&
xpand_net
));
mysql_error
(
&
xpand_net
));
return
error_code
;
return
error_code
;
}
}
...
@@ -256,8 +255,7 @@ int xpand_connection::read_query_response()
...
@@ -256,8 +255,7 @@ int xpand_connection::read_query_response()
if
(
comerr
)
if
(
comerr
)
{
{
error_code
=
mysql_errno
(
&
xpand_net
);
error_code
=
mysql_errno
(
&
xpand_net
);
my_printf_error
(
error_code
,
my_printf_error
(
error_code
,
"Xpand error: %s"
,
MYF
(
0
),
"Xpand error: %s"
,
MYF
(
0
),
mysql_error
(
&
xpand_net
));
mysql_error
(
&
xpand_net
));
}
}
...
@@ -375,9 +373,8 @@ int xpand_connection::run_query(String &stmt)
...
@@ -375,9 +373,8 @@ int xpand_connection::run_query(String &stmt)
return
error_code
;
return
error_code
;
}
}
int
xpand_connection
::
write_row
(
ulonglong
xpand_table_oid
,
int
xpand_connection
::
write_row
(
ulonglong
xpand_table_oid
,
uchar
*
packed_row
,
uchar
*
packed_row
,
size_t
packed_size
,
size_t
packed_size
,
ulonglong
*
last_insert_id
)
ulonglong
*
last_insert_id
)
{
{
int
error_code
;
int
error_code
;
command_length
=
0
;
command_length
=
0
;
...
@@ -405,10 +402,9 @@ int xpand_connection::write_row(ulonglong xpand_table_oid,
...
@@ -405,10 +402,9 @@ int xpand_connection::write_row(ulonglong xpand_table_oid,
return
error_code
;
return
error_code
;
}
}
int
xpand_connection
::
key_update
(
ulonglong
xpand_table_oid
,
int
xpand_connection
::
key_update
(
ulonglong
xpand_table_oid
,
uchar
*
packed_key
,
uchar
*
packed_key
,
size_t
packed_key_length
,
size_t
packed_key_length
,
MY_BITMAP
*
update_set
,
MY_BITMAP
*
update_set
,
uchar
*
packed_new_data
,
uchar
*
packed_new_data
,
size_t
packed_new_length
)
size_t
packed_new_length
)
{
{
int
error_code
;
int
error_code
;
...
@@ -746,7 +742,8 @@ int xpand_connection::scan_query(String &stmt, uchar *fieldtype, uint fields,
...
@@ -746,7 +742,8 @@ int xpand_connection::scan_query(String &stmt, uchar *fieldtype, uint fields,
if
((
error_code
=
add_command_operand_str
(
fieldtype
,
fields
)))
if
((
error_code
=
add_command_operand_str
(
fieldtype
,
fields
)))
return
error_code
;
return
error_code
;
if
((
error_code
=
add_command_operand_str
(
field_metadata
,
field_metadata_size
)))
if
((
error_code
=
add_command_operand_str
(
field_metadata
,
field_metadata_size
)))
return
error_code
;
return
error_code
;
// This variable length string calls for an additional store w/o lcb lenth prefix.
// This variable length string calls for an additional store w/o lcb lenth prefix.
...
...
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