Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-26285

Refactor spider_db_mbase_util::open_item_func()

Details

    Description

      spider_db_mbase_util::open_item_func() is a so-called monster function. It is difficult to maintain while it is expected that we need to modify it when a new SQL function or a new func_type is added.

      • spider_db_mbase_util::open_item_func(Item_func *item_func, ...) breaks almost every time new Item_func::Functyp} is added (e.g., MDEV-24760, MDEV-24517). A possible solution would be removeing the default case and enable -Wswitch.
      • Split the function into two different functions: one handles the case of str != NULL and the other handles the case of str == NULL.

      NOTE: You don't need to make everything ideal at once, and it's impossible to do that with complex middleware like databases. Refactor only to the extent that you are sure it is safe to do so without additional unit tests.

      Attachments

        Issue Links

          Activity

            Transition Time In Source Status Execution Times
            Nayuta Yanagisawa (Inactive) made transition -
            Open In Progress
            7d 14h 51m 1
            Nayuta Yanagisawa (Inactive) made transition -
            In Progress Stalled
            5d 21h 35m 1
            Nayuta Yanagisawa (Inactive) made transition -
            Stalled In Progress
            2d 1h 4m 1
            Nayuta Yanagisawa (Inactive) made transition -
            In Progress In Review
            3h 57m 1
            Nayuta Yanagisawa (Inactive) made transition -
            In Review Stalled
            153d 14h 4m 2
            Sergei Golubchik made transition -
            Stalled In Review
            368d 13h 17m 2
            Sergei Golubchik made transition -
            In Review Closed
            2d 16h 6m 1

            People

              serg Sergei Golubchik
              nayuta-yanagisawa Nayuta Yanagisawa (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.