[MDEV-5085] Dynamic columns require inclusion of my_sys.h and my_global.h Created: 2013-10-01  Updated: 2013-10-24  Resolved: 2013-10-24

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.0.6
Fix Version/s: 10.0.5

Type: Bug Priority: Blocker
Reporter: Georg Richter Assignee: Oleksandr Byelkin
Resolution: Fixed Votes: 0
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



 Comments   
Comment by Anders Karlsson [ 2013-10-01 ]

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.

Comment by Oleksandr Byelkin [ 2013-10-07 ]

committed for review

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