jacktengg opened a new issue, #11255:
URL: https://github.com/apache/doris/issues/11255

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/incubator-doris/issues?q=is%3Aissue) and 
found no similar issues.
   
   
   ### Version
   
   dev-1.1.1
   
   ### What's Wrong?
   
   insert data from odbc table to olap table cause be coredump:
   ```
   I0727 15:56:14.075747 64554 odbc_connector.cpp:115] connect 
success:Driver=MySQL;Server=127.0.0.1;Port=3306;DataBase=test;Uid=root;
   I0727 15:56:14.076445 64554 odbc_connector.cpp:138] execute success:SELECT 
`id`, `reason` FROM `tb1` column count:2
   I0727 15:56:14.077713 64780 tablets_channel.cpp:60] open tablets channel: 
(id=7e694eaec9bb40fa-b526b5111a0b5dc4,index_id=11005), tablets num: 10, 
timeout(s): 300
   [New Thread 0x7fff17fe5700 (LWP 65811)]
   F0727 15:56:14.078720 64554 text_converter.hpp:282] Check failed: false bad 
slot type: STRING
   *** Check failure stack trace: ***
       @     0x55555bd65dfd  google::LogMessage::Fail()
       @     0x55555bd68339  google::LogMessage::SendToLog()
       @     0x55555bd65966  google::LogMessage::Flush()
       @     0x55555bd689a9  google::LogMessageFatal::~LogMessageFatal()
       @     0x55555a406c76  doris::TextConverter::write_column()
       @     0x55555a404f56  doris::vectorized::VOdbcScanNode::get_next()
       @     0x5555597eb4be  
doris::PlanFragmentExecutor::get_vectorized_internal()
       @     0x5555597eae95  
doris::PlanFragmentExecutor::open_vectorized_internal()
       @     0x5555597ea957  doris::PlanFragmentExecutor::open()
       @     0x5555597033c2  doris::FragmentExecState::execute()
       @     0x5555597062e0  doris::FragmentMgr::_exec_actual()
       @     0x555559729117  std::__invoke_impl<>()
       @     0x5555597281c7  
_ZSt10__invoke_rIvRMN5doris11FragmentMgrEFvSt10shared_ptrINS0_17FragmentExecStateEESt8functionIFvPNS0_20PlanFragmentExecutorEEEEJRPS1_RS4_RS9_EENSt9enable_ifIX16is_invocable_r_vIT_T0_DpT1_EESI_E4typeEOSJ_DpOSK_
       @     0x555559726c3b  
_ZNSt12_Bind_resultIvFMN5doris11FragmentMgrEFvSt10shared_ptrINS0_17FragmentExecStateEESt8functionIFvPNS0_20PlanFragmentExecutorEEEEPS1_S4_S9_EE6__callIvJEJLm0ELm1ELm2EEEET_OSt5tupleIJDpT0_EESt12_Index_tupleIJXspT1_EEE
       @     0x555559724c57  std::_Bind_result<>::operator()<>()
       @     0x555559721ff6  std::__invoke_impl<>()
       @     0x55555971e160  
_ZSt10__invoke_rIvRSt12_Bind_resultIvFMN5doris11FragmentMgrEFvSt10shared_ptrINS1_17FragmentExecStateEESt8functionIFvPNS1_20PlanFragmentExecutorEEEEPS2_S5_SA_EEJEENSt9enable_ifIX16is_invocable_r_vIT_T0_DpT1_EESI_E4typeEOSJ_DpOSK_
       @     0x55555971a436  std::_Function_handler<>::_M_invoke()
       @     0x5555596c7700  std::function<>::operator()()
       @     0x555559994766  doris::FunctionRunnable::run()
       @     0x5555599925e5  doris::ThreadPool::dispatch_thread()
       @     0x5555599a04be  std::__invoke_impl<>()
       @     0x55555999ff2d  std::__invoke<>()
       @     0x55555999f761  
_ZNSt5_BindIFMN5doris10ThreadPoolEFvvEPS1_EE6__callIvJEJLm0EEEET_OSt5tupleIJDpT0_EESt12_Index_tupleIJXspT1_EEE
       @     0x55555999ec17  std::_Bind<>::operator()<>()
       @     0x55555999d96a  std::__invoke_impl<>()
       @     0x55555999c532  
_ZSt10__invoke_rIvRSt5_BindIFMN5doris10ThreadPoolEFvvEPS2_EEJEENSt9enable_ifIX16is_invocable_r_vIT_T0_DpT1_EESA_E4typeEOSB_DpOSC_
       @     0x55555999a6e7  std::_Function_handler<>::_M_invoke()
       @     0x5555596c7700  std::function<>::operator()()
       @     0x55555998660d  doris::Thread::supervise_thread()
       @     0x7ffff70d8ea5  start_thread
       @     0x7ffff73ebb0d  __clone
   --Type <RET> for more, q to quit, c to continue without paging--c
   
   Thread 222 "FragmentMgrThre" received signal SIGABRT, Aborted.
   ```
   
   ### What You Expected?
   
   insert OK
   
   ### How to Reproduce?
   
   Create table in mysql server and insert data:
   ```
   create table tb1 (`id` int(11) NOT NULL COMMENT "主键id", `reason` text null 
comment "reason");
   insert into tb1 values(1, "aaa");
   insert into tb1 values(2, "bbb);
   ```
   
   Creat external and olap tables in doris:
   ```
   CREATE EXTERNAL RESOURCE `mysql_resource`
   PROPERTIES (
       "host" = "127.0.0.1",
       "port" = "3306",
       "user" = "root",
       "password" = "123",
       "database" = "test",
       "driver" = "MySQL",
       "odbc_type" = "mysql",
       "type" = "odbc_catalog");
   
   DROP TABLE if exists `ex_tb`;
   CREATE EXTERNAL TABLE if not exists `ex_tb` (
         `id` int(11) NOT NULL COMMENT "主键id",
         `reason` string NULL COMMENT "理由"
   ) ENGINE=ODBC
   COMMENT "ODBC 外部表"
   PROPERTIES (
       "odbc_catalog_resource" = "mysql_resource",
       "database" = "test",
       "table" = "tb1"
   );
   
   DROP TABLE if exists `in_tb`;
   CREATE TABLE if not exists `in_tb` (
         `id` int(11) NOT NULL COMMENT "主键id",
         `reason` string REPLACE_IF_NOT_NULL NULL COMMENT "理由"
   ) ENGINE=OLAP
   AGGREGATE KEY(`id`)
   COMMENT "OLAP"
   DISTRIBUTED BY HASH(`id`) BUCKETS 10
   PROPERTIES (
       "replication_allocation" = "tag.location.default: 1",
       "in_memory" = "false",
       "storage_format" = "V2"
   );
   ```
   
   insert external table data into olap table:
   ```
   insert into in_tb select * from ex_tb;
   ```
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to