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

Dynamic columns require inclusion of my_sys.h and my_global.h

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 10.0.6
    • Fix Version/s: 10.0.5
    • Component/s: None
    • Labels:
      None
    • Environment:
      all

      Description

      Dynamic columns (ma_dyncol.h) uses structs DYNAMIC_STRING and LEX_STRING) which are included via my_sys.h and my_global.h.
      These files shouldn't be included in application programs (also my_global.h includes other files which aren't part of the binary distribution).

      How to fix:

      ma_dyncol.h
      #ifndef _my_sys_h
      +typedef struct st_dynamic_string
      +{
      +    char *str;
      +    size_t length,max_length,alloc_increment;
      +} DYNAMIC_STRING;
      +#endif
      
      +#ifndef MY_GLOBAL_INCLUDED
      +struct st_mysql_lex_string
      +{
      +  char *str;
      +  size_t length;
      +};
      +typedef struct st_mysql_lex_string MYSQL_LEX_STRING;
      +typedef struct st_mysql_lex_string LEX_STRING;
      +#endif
      

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            karlsson Anders Karlsson added a comment -

            If autotolls is used by the application program, then as my_global.h is currently forced to be included, we have a clash here as many defines, such as PACKAGE etc, are generated by autotools, but are also defined in my_config.h which in turn is included by my_global.h.

            Show
            karlsson Anders Karlsson added a comment - If autotolls is used by the application program, then as my_global.h is currently forced to be included, we have a clash here as many defines, such as PACKAGE etc, are generated by autotools, but are also defined in my_config.h which in turn is included by my_global.h.
            Hide
            sanja Oleksandr Byelkin added a comment -

            committed for review

            Show
            sanja Oleksandr Byelkin added a comment - committed for review

              People

              • Assignee:
                sanja Oleksandr Byelkin
                Reporter:
                georg Georg Richter
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: