-
-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: Implement the bit data type #919
Comments
BIT data type of innodb The BIT data type is used to store bit values. A type of BIT(M) enables storage of M-bit values. M can
range from 1 to 64.
To specify bit values, b'value' notation can be used. value is a binary value written using zeros and
ones. For example, b'111' and b'10000000' represent 7 and 128, respectively.
If you assign a value to a BIT(M) column that is less than M bits long, the value is padded on the left
with zeros. For example, assigning a value of b'101' to a BIT(6) column is, in effect, the same as
assigning b'000101'. |
OverviewTo implement the BIT data type, we need to implement related functions in three processes: create table process, insert data process, and query process. 1. Create table processing flowIncrease the processing of BIT field attributes when creating a table Tianmu::core::Engine::GetAttrTypeInfo(const Field & field) (\opt\litaihong\stonedb\storage\tianmu\core\engine.cpp:759)
Tianmu::core::Engine::GetTableOption(Tianmu::core::Engine * const this, const std::string & table, TABLE * form) (\opt\litaihong\stonedb\storage\tianmu\core\engine.cpp:628)
Tianmu::core::Engine::CreateTable(Tianmu::core::Engine * const this, const std::string & table, TABLE * form) (\opt\litaihong\stonedb\storage\tianmu\core\engine.cpp:636)
Tianmu::dbhandler::TianmuHandler::create(Tianmu::dbhandler::TianmuHandler * const this, const char * name, TABLE * table_arg, HA_CREATE_INFO * create_info) (\opt\litaihong\stonedb\storage\tianmu\handler\tianmu_handler.cpp:1223)
handler::ha_create(handler * const this, const char * name, TABLE * form, HA_CREATE_INFO * info) (\opt\litaihong\stonedb\sql\handler.cc:5020)
ha_create_table(THD * thd, const char * path, const char * db, const char * table_name, HA_CREATE_INFO * create_info, bool update_create_info, bool is_temp_table) (\opt\litaihong\stonedb\sql\handler.cc:5179)
rea_create_table(THD * thd, const char * path, const char * db, const char * table_name, HA_CREATE_INFO * create_info, List<Create_field> & create_fields, uint keys, KEY * key_info, handler * file, bool no_ha_table) (\opt\litaihong\stonedb\sql\unireg.cc:563)
create_table_impl(THD * thd, const char * db, const char * table_name, const char * error_table_name, const char * path, HA_CREATE_INFO * create_info, Alter_info * alter_info, bool internal_tmp_table, uint select_field_count, bool no_ha_table, bool * is_trans, KEY ** key_info, uint * key_count) (\opt\litaihong\stonedb\sql\sql_table.cc:5353)
mysql_create_table_no_lock(THD * thd, const char * db, const char * table_name, HA_CREATE_INFO * create_info, Alter_info * alter_info, uint select_field_count, bool * is_trans) (\opt\litaihong\stonedb\sql\sql_table.cc:5483)
mysql_create_table(THD * thd, TABLE_LIST * create_table, HA_CREATE_INFO * create_info, Alter_info * alter_info) (\opt\litaihong\stonedb\sql\sql_table.cc:5527)
mysql_execute_command(THD * thd, bool first_level) (\opt\litaihong\stonedb\sql\sql_parse.cc:3299)
mysql_parse(THD * thd, Parser_state * parser_state) (\opt\litaihong\stonedb\sql\sql_parse.cc:5621)
dispatch_command(THD * thd, const COM_DATA * com_data, enum_server_command command) (\opt\litaihong\stonedb\sql\sql_parse.cc:1495)
do_command(THD * thd) (\opt\litaihong\stonedb\sql\sql_parse.cc:1034)
handle_connection(void * arg) (\opt\litaihong\stonedb\sql\conn_handler\connection_handler_per_thread.cc:313)
pfs_spawn_thread(void * arg) (\opt\litaihong\stonedb\storage\perfschema\pfs.cc:2197) Add BIT data type: Tianmu::core::Engine::GetCorrespondingType(const enum_field_types & eft) (\opt\litaihong\stonedb\storage\tianmu\core\engine_convert.cpp:568)
Tianmu::core::Engine::GetCorrespondingType(const Field & field) (\opt\litaihong\stonedb\storage\tianmu\core\engine_convert.cpp:575)
Tianmu::core::Engine::GetAttrTypeInfo(const Field & field) (\opt\litaihong\stonedb\storage\tianmu\core\engine.cpp:760)
Tianmu::core::Engine::GetTableOption(Tianmu::core::Engine * const this, const std::string & table, TABLE * form) (\opt\litaihong\stonedb\storage\tianmu\core\engine.cpp:628)
Tianmu::core::Engine::CreateTable(Tianmu::core::Engine * const this, const std::string & table, TABLE * form) (\opt\litaihong\stonedb\storage\tianmu\core\engine.cpp:636)
Tianmu::dbhandler::TianmuHandler::create(Tianmu::dbhandler::TianmuHandler * const this, const char * name, TABLE * table_arg, HA_CREATE_INFO * create_info) (\opt\litaihong\stonedb\storage\tianmu\handler\tianmu_handler.cpp:1223)
handler::ha_create(handler * const this, const char * name, TABLE * form, HA_CREATE_INFO * info) (\opt\litaihong\stonedb\sql\handler.cc:5020)
ha_create_table(THD * thd, const char * path, const char * db, const char * table_name, HA_CREATE_INFO * create_info, bool update_create_info, bool is_temp_table) (\opt\litaihong\stonedb\sql\handler.cc:5179)
rea_create_table(THD * thd, const char * path, const char * db, const char * table_name, HA_CREATE_INFO * create_info, List<Create_field> & create_fields, uint keys, KEY * key_info, handler * file, bool no_ha_table) (\opt\litaihong\stonedb\sql\unireg.cc:563)
create_table_impl(THD * thd, const char * db, const char * table_name, const char * error_table_name, const char * path, HA_CREATE_INFO * create_info, Alter_info * alter_info, bool internal_tmp_table, uint select_field_count, bool no_ha_table, bool * is_trans, KEY ** key_info, uint * key_count) (\opt\litaihong\stonedb\sql\sql_table.cc:5353)
mysql_create_table_no_lock(THD * thd, const char * db, const char * table_name, HA_CREATE_INFO * create_info, Alter_info * alter_info, uint select_field_count, bool * is_trans) (\opt\litaihong\stonedb\sql\sql_table.cc:5483)
mysql_create_table(THD * thd, TABLE_LIST * create_table, HA_CREATE_INFO * create_info, Alter_info * alter_info) (\opt\litaihong\stonedb\sql\sql_table.cc:5527)
mysql_execute_command(THD * thd, bool first_level) (\opt\litaihong\stonedb\sql\sql_parse.cc:3299)
mysql_parse(THD * thd, Parser_state * parser_state) (\opt\litaihong\stonedb\sql\sql_parse.cc:5621)
dispatch_command(THD * thd, const COM_DATA * com_data, enum_server_command command) (\opt\litaihong\stonedb\sql\sql_parse.cc:1495)
do_command(THD * thd) (\opt\litaihong\stonedb\sql\sql_parse.cc:1034)
handle_connection(void * arg) (\opt\litaihong\stonedb\sql\conn_handler\connection_handler_per_thread.cc:313)
pfs_spawn_thread(void * arg) (\opt\litaihong\stonedb\storage\perfschema\pfs.cc:2197) 2.Insert flow processingTianmu::core::Engine::EncodeRecord(Tianmu::core::Engine * const this, const std::string & table_path, int tid, Field ** field, size_t col, size_t blobs, std::unique_ptr<char [], std::default_delete<char []> > & buf, uint32_t & size) (\opt\litaihong\stonedb\storage\tianmu\core\engine.cpp:429)
Tianmu::core::Engine::InsertMemRow(Tianmu::core::Engine * const this, const std::string & table_path, std::shared_ptr<Tianmu::core::TableShare> & share, TABLE * table) (\opt\litaihong\stonedb\storage\tianmu\core\engine.cpp:1457)
Tianmu::core::Engine::InsertRow(Tianmu::core::Engine * const this, const std::string & table_path, Tianmu::core::Transaction * trans_, TABLE * table, std::shared_ptr<Tianmu::core::TableShare> & share) (\opt\litaihong\stonedb\storage\tianmu\core\engine.cpp:1469)
Tianmu::dbhandler::TianmuHandler::write_row(Tianmu::dbhandler::TianmuHandler * const this, uchar * buf) (\opt\litaihong\stonedb\storage\tianmu\handler\tianmu_handler.cpp:424)
handler::ha_write_row(handler * const this, uchar * buf) (\opt\litaihong\stonedb\sql\handler.cc:8188)
write_record(THD * thd, TABLE * table, COPY_INFO * info, COPY_INFO * update) (\opt\litaihong\stonedb\sql\sql_insert.cc:1902)
Sql_cmd_insert::mysql_insert(Sql_cmd_insert * const this, THD * thd, TABLE_LIST * table_list) (\opt\litaihong\stonedb\sql\sql_insert.cc:776)
Sql_cmd_insert::execute(Sql_cmd_insert * const this, THD * thd) (\opt\litaihong\stonedb\sql\sql_insert.cc:3149)
mysql_execute_command(THD * thd, bool first_level) (\opt\litaihong\stonedb\sql\sql_parse.cc:3619)
mysql_parse(THD * thd, Parser_state * parser_state) (\opt\litaihong\stonedb\sql\sql_parse.cc:5621)
dispatch_command(THD * thd, const COM_DATA * com_data, enum_server_command command) (\opt\litaihong\stonedb\sql\sql_parse.cc:1495)
do_command(THD * thd) (\opt\litaihong\stonedb\sql\sql_parse.cc:1034)
handle_connection(void * arg) (\opt\litaihong\stonedb\sql\conn_handler\connection_handler_per_thread.cc:313)
pfs_spawn_thread(void * arg) (\opt\litaihong\stonedb\storage\perfschema\pfs.cc:2197) 3、query processAdded BIT data type and handling of correction values. Tianmu::core::DataType::DataType(Tianmu::core::DataType * const this, Tianmu::common::CT atype, int prec, int scale, DTCollation collation) (\opt\litaihong\stonedb\storage\tianmu\core\data_type.cpp:90)
Tianmu::core::DataType::operator=(Tianmu::core::DataType * const this, const Tianmu::core::ColumnType & ct) (\opt\litaihong\stonedb\storage\tianmu\core\data_type.cpp:108)
Tianmu::vcolumn::ExpressionColumn::ExpressionColumn(Tianmu::vcolumn::ExpressionColumn * const this, Tianmu::core::MysqlExpression * expr, Tianmu::core::TempTable * temp_table, int temp_table_alias, Tianmu::core::MultiIndex * mind) (\opt\litaihong\stonedb\storage\tianmu\vc\expr_column.cpp:48)
Tianmu::core::Query::CreateColumnFromExpression(Tianmu::core::Query * const this, const std::vector<Tianmu::core::MysqlExpression*, std::allocator<Tianmu::core::MysqlExpression*> > & exprs, Tianmu::core::TempTable * temp_table, int temp_table_alias, Tianmu::core::MultiIndex * mind) (\opt\litaihong\stonedb\storage\tianmu\core\query.cpp:489)
Tianmu::core::Query::Preexecute(Tianmu::core::Query * const this, Tianmu::core::CompiledQuery & qu, Tianmu::core::ResultSender * sender, bool display_now) (\opt\litaihong\stonedb\storage\tianmu\core\query.cpp:802)
Tianmu::core::Engine::Execute(Tianmu::core::Engine * const this, THD * thd, LEX * lex, Query_result * result_output, SELECT_LEX_UNIT * unit_for_union) (\opt\litaihong\stonedb\storage\tianmu\core\engine_execute.cpp:421)
Tianmu::core::Engine::HandleSelect(Tianmu::core::Engine * const this, THD * thd, LEX * lex, Query_result *& result, ulong setup_tables_done_option, int & res, int & optimize_after_tianmu, int & tianmu_free_join, int with_insert) (\opt\litaihong\stonedb\storage\tianmu\core\engine_execute.cpp:232)
Tianmu::dbhandler::TIANMU_HandleSelect(THD * thd, LEX * lex, Query_result *& result, ulong setup_tables_done_option, int & res, int & optimize_after_tianmu, int & tianmu_free_join, int with_insert) (\opt\litaihong\stonedb\storage\tianmu\handler\ha_rcengine.cpp:82)
execute_sqlcom_select(THD * thd, TABLE_LIST * all_tables) (\opt\litaihong\stonedb\sql\sql_parse.cc:5182)
mysql_execute_command(THD * thd, bool first_level) (\opt\litaihong\stonedb\sql\sql_parse.cc:2831)
mysql_parse(THD * thd, Parser_state * parser_state) (\opt\litaihong\stonedb\sql\sql_parse.cc:5621)
dispatch_command(THD * thd, const COM_DATA * com_data, enum_server_command command) (\opt\litaihong\stonedb\sql\sql_parse.cc:1495)
do_command(THD * thd) (\opt\litaihong\stonedb\sql\sql_parse.cc:1034)
handle_connection(void * arg) (\opt\litaihong\stonedb\sql\conn_handler\connection_handler_per_thread.cc:313)
pfs_spawn_thread(void * arg) (\opt\litaihong\stonedb\storage\perfschema\pfs.cc:2197) Get the value of the bit data type Tianmu::core::Item_tianmufield::SetType(Tianmu::core::Item_tianmufield * const this, Tianmu::core::DataType t) (\opt\litaihong\stonedb\storage\tianmu\core\item_tianmu_field.cpp:67)
Tianmu::core::MysqlExpression::EvalType(Tianmu::core::MysqlExpression * const this, Tianmu::core::MysqlExpression::TypOfVars * tv) (\opt\litaihong\stonedb\storage\tianmu\core\mysql_expression.cpp:377)
Tianmu::vcolumn::ExpressionColumn::ExpressionColumn(Tianmu::vcolumn::ExpressionColumn * const this, Tianmu::core::MysqlExpression * expr, Tianmu::core::TempTable * temp_table, int temp_table_alias, Tianmu::core::MultiIndex * mind) (\opt\litaihong\stonedb\storage\tianmu\vc\expr_column.cpp:70)
Tianmu::core::Query::CreateColumnFromExpression(Tianmu::core::Query * const this, const std::vector<Tianmu::core::MysqlExpression*, std::allocator<Tianmu::core::MysqlExpression*> > & exprs, Tianmu::core::TempTable * temp_table, int temp_table_alias, Tianmu::core::MultiIndex * mind) (\opt\litaihong\stonedb\storage\tianmu\core\query.cpp:489)
Tianmu::core::Query::Preexecute(Tianmu::core::Query * const this, Tianmu::core::CompiledQuery & qu, Tianmu::core::ResultSender * sender, bool display_now) (\opt\litaihong\stonedb\storage\tianmu\core\query.cpp:802)
Tianmu::core::Engine::Execute(Tianmu::core::Engine * const this, THD * thd, LEX * lex, Query_result * result_output, SELECT_LEX_UNIT * unit_for_union) (\opt\litaihong\stonedb\storage\tianmu\core\engine_execute.cpp:421)
Tianmu::core::Engine::HandleSelect(Tianmu::core::Engine * const this, THD * thd, LEX * lex, Query_result *& result, ulong setup_tables_done_option, int & res, int & optimize_after_tianmu, int & tianmu_free_join, int with_insert) (\opt\litaihong\stonedb\storage\tianmu\core\engine_execute.cpp:232)
Tianmu::dbhandler::TIANMU_HandleSelect(THD * thd, LEX * lex, Query_result *& result, ulong setup_tables_done_option, int & res, int & optimize_after_tianmu, int & tianmu_free_join, int with_insert) (\opt\litaihong\stonedb\storage\tianmu\handler\ha_rcengine.cpp:82)
execute_sqlcom_select(THD * thd, TABLE_LIST * all_tables) (\opt\litaihong\stonedb\sql\sql_parse.cc:5182)
mysql_execute_command(THD * thd, bool first_level) (\opt\litaihong\stonedb\sql\sql_parse.cc:2831)
mysql_parse(THD * thd, Parser_state * parser_state) (\opt\litaihong\stonedb\sql\sql_parse.cc:5621)
dispatch_command(THD * thd, const COM_DATA * com_data, enum_server_command command) (\opt\litaihong\stonedb\sql\sql_parse.cc:1495)
do_command(THD * thd) (\opt\litaihong\stonedb\sql\sql_parse.cc:1034)
handle_connection(void * arg) (\opt\litaihong\stonedb\sql\conn_handler\connection_handler_per_thread.cc:313)
pfs_spawn_thread(void * arg) (\opt\litaihong\stonedb\storage\perfschema\pfs.cc:2197) Tianmu::core::ColumnType::ColumnType(Tianmu::core::ColumnType * const this, const Tianmu::core::DataType & dt) (\opt\litaihong\stonedb\storage\tianmu\core\column_type.cpp:26)
Tianmu::vcolumn::ExpressionColumn::ExpressionColumn(Tianmu::vcolumn::ExpressionColumn * const this, Tianmu::core::MysqlExpression * expr, Tianmu::core::TempTable * temp_table, int temp_table_alias, Tianmu::core::MultiIndex * mind) (\opt\litaihong\stonedb\storage\tianmu\vc\expr_column.cpp:70)
Tianmu::core::Query::CreateColumnFromExpression(Tianmu::core::Query * const this, const std::vector<Tianmu::core::MysqlExpression*, std::allocator<Tianmu::core::MysqlExpression*> > & exprs, Tianmu::core::TempTable * temp_table, int temp_table_alias, Tianmu::core::MultiIndex * mind) (\opt\litaihong\stonedb\storage\tianmu\core\query.cpp:489)
Tianmu::core::Query::Preexecute(Tianmu::core::Query * const this, Tianmu::core::CompiledQuery & qu, Tianmu::core::ResultSender * sender, bool display_now) (\opt\litaihong\stonedb\storage\tianmu\core\query.cpp:802)
Tianmu::core::Engine::Execute(Tianmu::core::Engine * const this, THD * thd, LEX * lex, Query_result * result_output, SELECT_LEX_UNIT * unit_for_union) (\opt\litaihong\stonedb\storage\tianmu\core\engine_execute.cpp:421)
Tianmu::core::Engine::HandleSelect(Tianmu::core::Engine * const this, THD * thd, LEX * lex, Query_result *& result, ulong setup_tables_done_option, int & res, int & optimize_after_tianmu, int & tianmu_free_join, int with_insert) (\opt\litaihong\stonedb\storage\tianmu\core\engine_execute.cpp:232)
Tianmu::dbhandler::TIANMU_HandleSelect(THD * thd, LEX * lex, Query_result *& result, ulong setup_tables_done_option, int & res, int & optimize_after_tianmu, int & tianmu_free_join, int with_insert) (\opt\litaihong\stonedb\storage\tianmu\handler\ha_rcengine.cpp:82)
execute_sqlcom_select(THD * thd, TABLE_LIST * all_tables) (\opt\litaihong\stonedb\sql\sql_parse.cc:5182)
mysql_execute_command(THD * thd, bool first_level) (\opt\litaihong\stonedb\sql\sql_parse.cc:2831)
mysql_parse(THD * thd, Parser_state * parser_state) (\opt\litaihong\stonedb\sql\sql_parse.cc:5621)
dispatch_command(THD * thd, const COM_DATA * com_data, enum_server_command command) (\opt\litaihong\stonedb\sql\sql_parse.cc:1495)
do_command(THD * thd) (\opt\litaihong\stonedb\sql\sql_parse.cc:1034)
handle_connection(void * arg) (\opt\litaihong\stonedb\sql\conn_handler\connection_handler_per_thread.cc:313)
pfs_spawn_thread(void * arg) (\opt\litaihong\stonedb\storage\perfschema\pfs.cc:2197) Result set processing Tianmu::core::TempTable::SendResult(Tianmu::core::TempTable * const this, int64_t limit, int64_t offset, Tianmu::core::ResultSender & sender, bool pagewise) (\opt\litaihong\stonedb\storage\tianmu\core\temp_table_low.cpp:452)
Tianmu::core::TempTable::FillMaterializedBuffers(Tianmu::core::TempTable * const this, int64_t local_limit, int64_t local_offset, Tianmu::core::ResultSender * sender, bool pagewise) (\opt\litaihong\stonedb\storage\tianmu\core\temp_table_low.cpp:310)
Tianmu::core::TempTable::Materialize(Tianmu::core::TempTable * const this, bool in_subq, Tianmu::core::ResultSender * sender, bool lazy) (\opt\litaihong\stonedb\storage\tianmu\core\temp_table.cpp:1956)
Tianmu::core::Engine::Execute(Tianmu::core::Engine * const this, THD * thd, LEX * lex, Query_result * result_output, SELECT_LEX_UNIT * unit_for_union) (\opt\litaihong\stonedb\storage\tianmu\core\engine_execute.cpp:426)
Tianmu::core::Engine::HandleSelect(Tianmu::core::Engine * const this, THD * thd, LEX * lex, Query_result *& result, ulong setup_tables_done_option, int & res, int & optimize_after_tianmu, int & tianmu_free_join, int with_insert) (\opt\litaihong\stonedb\storage\tianmu\core\engine_execute.cpp:232)
Tianmu::dbhandler::TIANMU_HandleSelect(THD * thd, LEX * lex, Query_result *& result, ulong setup_tables_done_option, int & res, int & optimize_after_tianmu, int & tianmu_free_join, int with_insert) (\opt\litaihong\stonedb\storage\tianmu\handler\ha_rcengine.cpp:82)
execute_sqlcom_select(THD * thd, TABLE_LIST * all_tables) (\opt\litaihong\stonedb\sql\sql_parse.cc:5182)
mysql_execute_command(THD * thd, bool first_level) (\opt\litaihong\stonedb\sql\sql_parse.cc:2831)
mysql_parse(THD * thd, Parser_state * parser_state) (\opt\litaihong\stonedb\sql\sql_parse.cc:5621)
dispatch_command(THD * thd, const COM_DATA * com_data, enum_server_command command) (\opt\litaihong\stonedb\sql\sql_parse.cc:1495)
do_command(THD * thd) (\opt\litaihong\stonedb\sql\sql_parse.cc:1034)
handle_connection(void * arg) (\opt\litaihong\stonedb\sql\conn_handler\connection_handler_per_thread.cc:313)
pfs_spawn_thread(void * arg) (\opt\litaihong\stonedb\storage\perfschema\pfs.cc:2197) Tianmu::core::Item_tianmufield::FeedValue(Tianmu::core::Item_tianmufield * const this) (\opt\litaihong\stonedb\storage\tianmu\core\item_tianmu_field.cpp:126)
Tianmu::core::Item_tianmufield::val_str(Tianmu::core::Item_tianmufield * const this, String * str) (\opt\litaihong\stonedb\storage\tianmu\core\item_tianmu_field.cpp:183)
Item_func_conv::val_str(Item_func_conv * const this, String * str) (\opt\litaihong\stonedb\sql\item_strfunc.cc:3746)
Tianmu::core::MysqlExpression::ItemString2ValueOrNull(Item * item, int maxstrlen, Tianmu::common::CT a_type) (\opt\litaihong\stonedb\storage\tianmu\core\mysql_expression.cpp:517)
Tianmu::core::MysqlExpression::Evaluate(Tianmu::core::MysqlExpression * const this) (\opt\litaihong\stonedb\storage\tianmu\core\mysql_expression.cpp:459)
Tianmu::vcolumn::ExpressionColumn::IsNullImpl(Tianmu::vcolumn::ExpressionColumn * const this, const Tianmu::core::MIIterator & mit) (\opt\litaihong\stonedb\storage\tianmu\vc\expr_column.cpp:122)
Tianmu::vcolumn::VirtualColumnBase::IsNull(Tianmu::vcolumn::VirtualColumnBase * const this, const Tianmu::core::MIIterator & mit) (\opt\litaihong\stonedb\storage\tianmu\vc\virtual_column_base.h:104)
Tianmu::core::TempTable::SendResult(Tianmu::core::TempTable * const this, int64_t limit, int64_t offset, Tianmu::core::ResultSender & sender, bool pagewise) (\opt\litaihong\stonedb\storage\tianmu\core\temp_table_low.cpp:477)
Tianmu::core::TempTable::FillMaterializedBuffers(Tianmu::core::TempTable * const this, int64_t local_limit, int64_t local_offset, Tianmu::core::ResultSender * sender, bool pagewise) (\opt\litaihong\stonedb\storage\tianmu\core\temp_table_low.cpp:310)
Tianmu::core::TempTable::Materialize(Tianmu::core::TempTable * const this, bool in_subq, Tianmu::core::ResultSender * sender, bool lazy) (\opt\litaihong\stonedb\storage\tianmu\core\temp_table.cpp:1956)
Tianmu::core::Engine::Execute(Tianmu::core::Engine * const this, THD * thd, LEX * lex, Query_result * result_output, SELECT_LEX_UNIT * unit_for_union) (\opt\litaihong\stonedb\storage\tianmu\core\engine_execute.cpp:426)
Tianmu::core::Engine::HandleSelect(Tianmu::core::Engine * const this, THD * thd, LEX * lex, Query_result *& result, ulong setup_tables_done_option, int & res, int & optimize_after_tianmu, int & tianmu_free_join, int with_insert) (\opt\litaihong\stonedb\storage\tianmu\core\engine_execute.cpp:232)
Tianmu::dbhandler::TIANMU_HandleSelect(THD * thd, LEX * lex, Query_result *& result, ulong setup_tables_done_option, int & res, int & optimize_after_tianmu, int & tianmu_free_join, int with_insert) (\opt\litaihong\stonedb\storage\tianmu\handler\ha_rcengine.cpp:82)
execute_sqlcom_select(THD * thd, TABLE_LIST * all_tables) (\opt\litaihong\stonedb\sql\sql_parse.cc:5182)
mysql_execute_command(THD * thd, bool first_level) (\opt\litaihong\stonedb\sql\sql_parse.cc:2831)
mysql_parse(THD * thd, Parser_state * parser_state) (\opt\litaihong\stonedb\sql\sql_parse.cc:5621)
dispatch_command(THD * thd, const COM_DATA * com_data, enum_server_command command) (\opt\litaihong\stonedb\sql\sql_parse.cc:1495)
do_command(THD * thd) (\opt\litaihong\stonedb\sql\sql_parse.cc:1034)
handle_connection(void * arg) (\opt\litaihong\stonedb\sql\conn_handler\connection_handler_per_thread.cc:313)
pfs_spawn_thread(void * arg) (\opt\litaihong\stonedb\storage\perfschema\pfs.cc:2197) Tianmu::core::TempTable::SendResult(Tianmu::core::TempTable * const this, int64_t limit, int64_t offset, Tianmu::core::ResultSender & sender, bool pagewise) (\opt\litaihong\stonedb\storage\tianmu\core\temp_table_low.cpp:452)
Tianmu::core::TempTable::FillMaterializedBuffers(Tianmu::core::TempTable * const this, int64_t local_limit, int64_t local_offset, Tianmu::core::ResultSender * sender, bool pagewise) (\opt\litaihong\stonedb\storage\tianmu\core\temp_table_low.cpp:310)
Tianmu::core::TempTable::Materialize(Tianmu::core::TempTable * const this, bool in_subq, Tianmu::core::ResultSender * sender, bool lazy) (\opt\litaihong\stonedb\storage\tianmu\core\temp_table.cpp:1956)
Tianmu::core::Engine::Execute(Tianmu::core::Engine * const this, THD * thd, LEX * lex, Query_result * result_output, SELECT_LEX_UNIT * unit_for_union) (\opt\litaihong\stonedb\storage\tianmu\core\engine_execute.cpp:426)
Tianmu::core::Engine::HandleSelect(Tianmu::core::Engine * const this, THD * thd, LEX * lex, Query_result *& result, ulong setup_tables_done_option, int & res, int & optimize_after_tianmu, int & tianmu_free_join, int with_insert) (\opt\litaihong\stonedb\storage\tianmu\core\engine_execute.cpp:232)
Tianmu::dbhandler::TIANMU_HandleSelect(THD * thd, LEX * lex, Query_result *& result, ulong setup_tables_done_option, int & res, int & optimize_after_tianmu, int & tianmu_free_join, int with_insert) (\opt\litaihong\stonedb\storage\tianmu\handler\ha_rcengine.cpp:82)
execute_sqlcom_select(THD * thd, TABLE_LIST * all_tables) (\opt\litaihong\stonedb\sql\sql_parse.cc:5182)
mysql_execute_command(THD * thd, bool first_level) (\opt\litaihong\stonedb\sql\sql_parse.cc:2831)
mysql_parse(THD * thd, Parser_state * parser_state) (\opt\litaihong\stonedb\sql\sql_parse.cc:5621)
dispatch_command(THD * thd, const COM_DATA * com_data, enum_server_command command) (\opt\litaihong\stonedb\sql\sql_parse.cc:1495)
do_command(THD * thd) (\opt\litaihong\stonedb\sql\sql_parse.cc:1034)
handle_connection(void * arg) (\opt\litaihong\stonedb\sql\conn_handler\connection_handler_per_thread.cc:313)
pfs_spawn_thread(void * arg) (\opt\litaihong\stonedb\storage\perfschema\pfs.cc:2197) |
The tianmu engine does not support unsigned data types, but BIT data is unsigned. To implement the BIT data type, we need to implement the unsigned data type first. |
…t type stoneatom#919 [summary] 1. add support to create table with bit type 2. add support to desc/show fields with bit type table 3. currently we design bit(M) with (1 <= M <= 63), in the future we'll expand prec to 64.
[summary] 1. impl insert with mode delayed=0/1 2. impl simple select bit data from table
…t type stoneatom#919 [summary] 1. add support to create table with bit type 2. add support to desc/show fields with bit type table 3. currently we design bit(M) with (1 <= M <= 63), in the future we'll expand prec to 64.
[summary] 1. impl insert with mode delayed=0/1 2. impl simple select bit data from table
BIT values cannot be loaded directly using binary notation (for example, b'011010'). To work around this, use the SET clause to strip off the leading b' and trailing ' and perform a base-2 to base-10 conversion so that MySQL loads the values into the BIT column properly:
For BIT values in 0b binary notation (for example, 0b011010), use this SET clause instead to strip off the leading 0b:
|
In storage/tianmu/loader/parsing_strategy.cpp
For line 488, the res may be
|
This is related to loader module but founded in load bit test, I'll fix it in |
…t type stoneatom#919 [summary] 1. add support to create table with bit type 2. add support to desc/show fields with bit type table 3. currently we design bit(M) with (1 <= M <= 63), in the future we'll expand prec to 64.
[summary] 1. impl insert with mode delayed=0/1 2. impl simple select bit data from table
[summary] 1. impl insert with mode delayed=0/1 2. impl simple select bit data from table
[summary] impl load bit, including empty space and null value, to keep the src code integrity, we add an bit parse function just like others numeric does.
[summary] 1. revert some vars renaming code to keep old style. 2. fix type cast using reinterpret_cast to avoid c-style casting. 3. add more test cases and fix some errors. 4. format code.
…..where test case on bit types stoneatom#919
…t type #919 [summary] 1. add support to create table with bit type 2. add support to desc/show fields with bit type table 3. currently we design bit(M) with (1 <= M <= 63), in the future we'll expand prec to 64.
[summary] 1. impl insert with mode delayed=0/1 2. impl simple select bit data from table
[summary] impl load bit, including empty space and null value, to keep the src code integrity, we add an bit parse function just like others numeric does.
[summary] 1. revert some vars renaming code to keep old style. 2. fix type cast using reinterpret_cast to avoid c-style casting. 3. add more test cases and fix some errors. 4. format code.
…..where test case on bit types #919
Funciton
For more infos, see: |
…t type stoneatom#919 [summary] 1. add support to create table with bit type 2. add support to desc/show fields with bit type table 3. currently we design bit(M) with (1 <= M <= 63), in the future we'll expand prec to 64.
[summary] 1. impl insert with mode delayed=0/1 2. impl simple select bit data from table
[summary] impl load bit, including empty space and null value, to keep the src code integrity, we add an bit parse function just like others numeric does.
[summary] 1. revert some vars renaming code to keep old style. 2. fix type cast using reinterpret_cast to avoid c-style casting. 3. add more test cases and fix some errors. 4. format code.
…..where test case on bit types stoneatom#919
Is your feature request related to a problem? Please describe.
Describe the solution you'd like
Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: