summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql')
-rw-r--r--sql/CMakeLists.txt17
-rw-r--r--sql/log_event.cc2
-rw-r--r--sql/sql_insert.cc10
-rw-r--r--sql/sql_yacc.yy4
4 files changed, 24 insertions, 9 deletions
diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt
index f6ddfbfaf38..e824dcb4ad4 100644
--- a/sql/CMakeLists.txt
+++ b/sql/CMakeLists.txt
@@ -214,17 +214,22 @@ ELSE()
SET(MYSQLD_SOURCE main.cc ${DTRACE_PROBES_ALL})
ENDIF()
-IF(MSVC)
+IF(MSVC OR CMAKE_SYSTEM_NAME MATCHES AIX)
SET(libs_to_export_symbols sql mysys dbug strings)
# Create shared library of already compiled object
# Export all symbols from selected libraries, to be used
# by plugins
+ IF(MSVC)
+ SET(VERSIONINFO_RC ${PROJECT_BINARY_DIR}/versioninfo_dll.rc)
+ ELSE()
+ SET(VERSIONINFO_RC)
+ ENDIF()
ADD_LIBRARY(server SHARED
$<TARGET_OBJECTS:sql>
$<TARGET_OBJECTS:mysys>
$<TARGET_OBJECTS:dbug>
$<TARGET_OBJECTS:strings>
- ${PROJECT_BINARY_DIR}/versioninfo_dll.rc
+ ${VERSIONINFO_RC}
)
# We need to add all dependencies of sql/mysys/dbug/strings
@@ -245,7 +250,11 @@ IF(MSVC)
${all_deps}
sql_builtins
)
- SET_TARGET_PROPERTIES(server PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
+ IF(MSVC)
+ SET_TARGET_PROPERTIES(server PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
+ ELSE()
+ SET_TARGET_PROPERTIES(server PROPERTIES AIX_EXPORT_ALL_SYMBOLS TRUE)
+ ENDIF()
MYSQL_INSTALL_TARGETS(server DESTINATION ${INSTALL_BINDIR} COMPONENT Server)
ENDIF()
@@ -272,7 +281,7 @@ IF(NOT WITHOUT_DYNAMIC_PLUGINS)
ENDIF()
ENDIF(NOT WITHOUT_DYNAMIC_PLUGINS)
-IF(MSVC)
+IF(MSVC OR CMAKE_SYSTEM_NAME MATCHES AIX)
TARGET_LINK_LIBRARIES(mariadbd server)
ELSE()
TARGET_LINK_LIBRARIES(mariadbd LINK_PRIVATE sql sql_builtins)
diff --git a/sql/log_event.cc b/sql/log_event.cc
index 0388a2b19b1..7d1a52609e2 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -56,7 +56,9 @@
#define my_b_write_string(A, B) my_b_write((A), (uchar*)(B), (uint) (sizeof(B) - 1))
+#ifndef _AIX
PSI_memory_key key_memory_log_event;
+#endif
PSI_memory_key key_memory_Incident_log_event_message;
PSI_memory_key key_memory_Rows_query_log_event_rows_query;
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index 1e456a724e7..f26ee27df42 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -2763,7 +2763,7 @@ int write_delayed(THD *thd, TABLE *table, enum_duplicates duplic,
delayed_row *row= 0;
Delayed_insert *di=thd->di;
const Discrete_interval *forced_auto_inc;
- size_t user_len, host_len, ip_len;
+ size_t user_len, host_len, ip_length;
DBUG_ENTER("write_delayed");
DBUG_PRINT("enter", ("query = '%s' length %lu", query.str,
(ulong) query.length));
@@ -2798,7 +2798,7 @@ int write_delayed(THD *thd, TABLE *table, enum_duplicates duplic,
goto err;
}
- user_len= host_len= ip_len= 0;
+ user_len= host_len= ip_length= 0;
row->user= row->host= row->ip= NULL;
if (thd->security_ctx)
{
@@ -2807,12 +2807,12 @@ int write_delayed(THD *thd, TABLE *table, enum_duplicates duplic,
if (thd->security_ctx->host)
host_len= strlen(thd->security_ctx->host) + 1;
if (thd->security_ctx->ip)
- ip_len= strlen(thd->security_ctx->ip) + 1;
+ ip_length= strlen(thd->security_ctx->ip) + 1;
}
/* This can't be THREAD_SPECIFIC as it's freed in delayed thread */
if (!(row->record= (char*) my_malloc(PSI_INSTRUMENT_ME,
table->s->reclength +
- user_len + host_len + ip_len,
+ user_len + host_len + ip_length,
MYF(MY_WME))))
goto err;
memcpy(row->record, table->record[0], table->s->reclength);
@@ -2832,7 +2832,7 @@ int write_delayed(THD *thd, TABLE *table, enum_duplicates duplic,
if (thd->security_ctx->ip)
{
row->ip= row->record + table->s->reclength + user_len + host_len;
- memcpy(row->ip, thd->security_ctx->ip, ip_len);
+ memcpy(row->ip, thd->security_ctx->ip, ip_length);
}
}
row->query_id= thd->query_id;
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index fc3d0e6fe22..99c3d879f04 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -178,7 +178,11 @@ void _CONCAT_UNDERSCORED(turn_parser_debug_on,yyparse)()
The result will be in the process stderr (var/log/master.err)
*/
+#ifndef _AIX
extern int yydebug;
+#else
+ static int yydebug;
+#endif
yydebug= 1;
}
#endif