Patch for xtradb compilation on visual studio

12 views
Skip to first unread message

Kristian Nielsen

unread,
Dec 15, 2011, 7:45:40 AM12/15/11
to percona-dev, maria-de...@lists.launchpad.net
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,

Laurynas Biveinis

unread,
Dec 15, 2011, 8:10:44 AM12/15/11
to perco...@googlegroups.com, maria-de...@lists.launchpad.net
2011/12/15 Kristian Nielsen <knie...@knielsen-hq.org>:

> 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 -

Thank you, I have added it to
https://bugs.launchpad.net/percona-server/5.5/+bug/737895
where we track Windows compilation errors.

--
Laurynas

Reply all
Reply to author
Forward
0 new messages