[MDEV-28522] Delete constant SPIDER_SQL_TYPE_*_HS Created: 2022-05-10  Updated: 2023-03-24  Resolved: 2023-03-23

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - Spider
Fix Version/s: 11.1.0

Type: Task Priority: Major
Reporter: Nayuta Yanagisawa (Inactive) Assignee: Yuchen Pei
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-26858 Spider: Remove dead code related to H... Closed

 Description   

HandlerSocket support of Spider has been deleted by MDEV-26858. Thus, the constants, SPIDER_SQL_TYPE_*_HS, are no longer necessary.

Some functions for maintaining Spider tables take SPIDER_SQL_TYPE_OTHER_HS as arguments but this seems not to make sense.



 Comments   
Comment by Nayuta Yanagisawa (Inactive) [ 2022-05-27 ]

https://github.com/MariaDB/server/commit/793fc6d9b889269e222814f9b8851e2d32215775

Comment by Alexey Botchkov [ 2022-06-27 ]

fix the patch as discussed on Slack.

Comment by Nayuta Yanagisawa (Inactive) [ 2022-06-29 ]

Summary of the private discussion mentioned above:

There in the fix you do a number of changes like the following.

int spider_mbase_handler::append_flush_tables_part(
..
  DBUG_ENTER("spider_mbase_handler::append_flush_tables_part");
  DBUG_PRINT("info",("spider this=%p", this));
-  switch (sql_type)
-  {
-    case SPIDER_SQL_TYPE_OTHER_SQL:
-      str = &spider->result_list.sqls[link_idx];
-      break;
-    default:
-      DBUG_RETURN(0);
-  }
+  str= &spider->result_list.sqls[link_idx];

So, now it always does the 'str' assignment and the rest of the function. Previously that function was called as append_flush_tables_part(SPIDER_SQL_TYPE_OTHER_HS,... meaning it just did nothing - the DBUG_RETURN(0). So, the function's behavior changed.

The patch is wrong because the author (me) confused SPIDER_SQL_TYPE_OTHER_SQL with SPIDER_SQL_TYPE_OTHER_HS.

Comment by Nayuta Yanagisawa (Inactive) [ 2022-06-29 ]

So, Spider does nothing on table maintenance statements? Then, we can remove much more unused code.

Comment by Nayuta Yanagisawa (Inactive) [ 2022-06-29 ]

I will postpone this to 10.11 because it would delete a considerable amount of code.

Comment by Nayuta Yanagisawa (Inactive) [ 2022-09-19 ]

https://github.com/MariaDB/server/commit/422fb63a9bbee35c50b6c7be19d199afe0bc98fa

Comment by Alexey Botchkov [ 2022-11-26 ]

ok to push.

Comment by Yuchen Pei [ 2023-02-02 ]

Branch 11.1 does not exist yet, so we have to wait before pushing.

Comment by Yuchen Pei [ 2023-03-23 ]

Pushed to 11.1

Generated at Thu Feb 08 10:01:23 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.