← Back to team overview

maria-developers team mailing list archive

Patch for xtradb compilation on visual studio

 

Here is a patch for XtraDB (from Percona Server 5.5.17-rel22.1).

We needed this in MariaDB 5.5 to compile on Windows. The problem is that this
compiler apparently does not like having #ifdef inside macro invocations.

I thought Percona might want to include it upstream, in case there are other
compilers that also do not like this.

 - Kristian.

=== modified file 'storage/innobase/handler/ha_innodb.cc'
--- storage/innobase/handler/ha_innodb.cc	2011-12-15 09:34:14 +0000
+++ storage/innobase/handler/ha_innodb.cc	2011-12-15 12:35:48 +0000
@@ -12369,14 +12369,16 @@ static MYSQL_SYSVAR_ULONG(concurrency_ti
   "Number of times a thread is allowed to enter InnoDB within the same SQL query after it has once got the ticket",
   NULL, NULL, 500L, 1L, ~0L, 0);
 
-static MYSQL_SYSVAR_LONG(kill_idle_transaction, srv_kill_idle_transaction,
-  PLUGIN_VAR_RQCMDARG,
 #ifdef EXTENDED_FOR_KILLIDLE
-  "If non-zero value, the idle session with transaction which is idle over the value in seconds is killed by InnoDB.",
+#define TMP_STR "If non-zero value, the idle session with transaction which is idle over the value in seconds is killed by InnoDB."
 #else
-  "No effect for this build.",
+#define TMP_STR "No effect for this build."
 #endif
+static MYSQL_SYSVAR_LONG(kill_idle_transaction, srv_kill_idle_transaction,
+  PLUGIN_VAR_RQCMDARG,
+  TMP_STR,
   NULL, NULL, 0, 0, LONG_MAX, 0);
+#undef TMP_STR
 
 static MYSQL_SYSVAR_LONG(file_io_threads, innobase_file_io_threads,
   PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY | PLUGIN_VAR_NOSYSVAR,



Follow ups