[MCOL-3941] ColumnStore in 10.5 doesn't compile Created: 2020-04-11  Updated: 2020-04-28  Resolved: 2020-04-28

Status: Closed
Project: MariaDB ColumnStore
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Sergei Golubchik Assignee: Roman
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Blocks
blocks MDEV-22197 test columnstore for 10.5 Closed
Relates

 Description   

numerous compilation errors related to 10.5 specific changes. An incomplete fix:

diff --git a/dbcon/mysql/ha_mcs.cpp b/dbcon/mysql/ha_mcs.cpp
index 67b683e2..546d977d 100644
--- a/dbcon/mysql/ha_mcs.cpp
+++ b/dbcon/mysql/ha_mcs.cpp
@@ -146,10 +146,10 @@ static int columnstore_init_func(void* p)
 #ifndef _MSC_VER
     (void) pthread_mutex_init(&mcs_mutex, MY_MUTEX_INIT_FAST);
 #endif
-    (void) my_hash_init(&mcs_open_tables, system_charset_info, 32, 0, 0,
+    (void) my_hash_init(PSI_NOT_INSTRUMENTED, &mcs_open_tables,
+                        system_charset_info, 32, 0, 0,
                         (my_hash_get_key) mcs_get_key, 0, 0);
 
-    mcs_hton->state =   SHOW_OPTION_YES;
     mcs_hton->create =  mcs_create_handler;
     mcs_hton->flags =   HTON_CAN_RECREATE;
 //  mcs_hton->discover_table = mcs_discover;
@@ -910,7 +910,7 @@ int ha_mcs::external_lock(THD* thd, int lock_type)
     {
         //@Bug 2526 Only register the transaction when autocommit is off
         if ((thd_test_options(thd, OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)))
-            trans_register_ha( thd, true, mcs_hton);
+            trans_register_ha( thd, true, mcs_hton, 0);
 
         rc = ha_mcs_impl_external_lock(thd, table, lock_type);
     }
diff --git a/dbcon/mysql/ha_mcs_impl.cpp b/dbcon/mysql/ha_mcs_impl.cpp
index 3ffa33cc..dc8d0cf4 100644
--- a/dbcon/mysql/ha_mcs_impl.cpp
+++ b/dbcon/mysql/ha_mcs_impl.cpp
@@ -1336,10 +1336,10 @@ uint32_t doUpdateDelete(THD* thd, gp_walk_info& gwi)
             string tmpTableName = bestTableName(item);
 
             //@Bug 5312 populate aliasname with tablename if it is empty
-            if (!item->table_name)
+            if (!item->table_name.length)
                 aliasName = tmpTableName;
             else
-                aliasName = item->table_name;
+                aliasName = item->table_name.str;
 
             if (strcasecmp(tableName.c_str(), "") == 0)
             {
@@ -1355,7 +1355,7 @@ uint32_t doUpdateDelete(THD* thd, gp_walk_info& gwi)
                 return -1;
             }
 
-            if (!item->db_name)
+            if (!item->db_name.length)
             {
                 //@Bug 5312. if subselect, wait until the schema info is available.
                 if (thd->derived_tables_processing)
@@ -1369,7 +1369,7 @@ uint32_t doUpdateDelete(THD* thd, gp_walk_info& gwi)
                 }
             }
             else
-                schemaName = string(item->db_name);
+                schemaName = string(item->db_name.str);
 
             columnAssignmentPtr = new ColumnAssignment(item->name.str, "=", "");
             if (item->field_type() == MYSQL_TYPE_TIMESTAMP ||
@@ -1460,9 +1460,9 @@ uint32_t doUpdateDelete(THD* thd, gp_walk_info& gwi)
                     {
                         sectableName = bestTableName(tmpVec[i]);
 
-                        if ( tmpVec[i]->db_name )
+                        if ( tmpVec[i]->db_name.length )
                         {
-                            secschemaName = string(tmpVec[i]->db_name);
+                            secschemaName = string(tmpVec[i]->db_name.str);
                         }
 
                         if ( (strcasecmp(tableName.c_str(), sectableName.c_str()) != 0) ||
@@ -1479,11 +1479,11 @@ uint32_t doUpdateDelete(THD* thd, gp_walk_info& gwi)
                 isFromCol = true;
                 columnAssignmentPtr->fFromCol = true;
                 Item_field* setIt = reinterpret_cast<Item_field*> (value);
-                string sectableName = string(setIt->table_name);
+                string sectableName = string(setIt->table_name.str);
 
-                if ( setIt->db_name ) //derived table
+                if ( setIt->db_name.length ) //derived table
                 {
-                    string secschemaName = string(setIt->db_name);
+                    string secschemaName = string(setIt->db_name.str);
 
                     if ( (strcasecmp(tableName.c_str(), sectableName.c_str()) != 0) || (strcasecmp(schemaName.c_str(), secschemaName.c_str()) != 0))
                     {

see bb-10.5-cs



 Comments   
Comment by Roman [ 2020-04-12 ]

sergThe stub git submodule commit must be outdated b/c the current HEAD of the branch for 10.5 has this change. JFYI we are using mariadb-10.5.2 as the server's branch to build the engine code.

Comment by Sergei Golubchik [ 2020-04-12 ]

Right, I suspected that, unfortunately only after creating this issue. bb-10.5-cs was created by cherry-picking related commits from 10.4-es branch. Tell me what commit to use and I'll update the submodule

Comment by Roman [ 2020-04-13 ]

7af55b2.
Plz note that MCS tries to start MDB on its own using safe_mysqld if there is no systemd unit for MDB.

Comment by Roman [ 2020-04-20 ]

Plz review.

Comment by Gagan Goel (Inactive) [ 2020-04-21 ]

Build with Ninja on 1.5 now succeeds.

Comment by Roman [ 2020-04-21 ]

4QA You need to build MCS with ninja.

Comment by Roman [ 2020-04-28 ]

Plz look into MCOL-3940 instead of this one.

Generated at Thu Feb 08 02:46:35 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.