Windows compilations errors

Bug #737895 reported by Vadim Tkachenko on 2011-03-18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona Server moved to
Status tracked in 5.7
Won't Fix
Won't Fix

Bug Description

I have next errors trying to compile under Windows Percona Server 5.5.9:

2>os\os0file.c(1431): warning C4013: 'thd_flush_log_at_trx_commit' undefined; assuming extern returning int
2>os\os0file.c(4204): error C2198: 'os_aio_windows_handle' : too few arguments for call
2>os\os0file.c(4308): error C2065: 'n_consecutive' : undeclared identifier
2>os\os0file.c(4311): error C2065: 'n_consecutive' : undeclared identifier
2>os\os0file.c(4312): error C2065: 'n_consecutive' : undeclared identifier
2>os\os0file.c(4314): error C2065: 'n_consecutive' : undeclared identifier
2>os\os0file.c(4315): error C2065: 'n_consecutive' : undeclared identifier
2>log\log0recv.c(1404): warning C4244: '=' : conversion from 'ulint' to 'unsigned int', possible loss of data
2>log\log0recv.c(1405): warning C4244: '=' : conversion from 'ulint' to 'unsigned int', possible loss of data
2>log\log0recv.c(2984): error C2057: expected constant expression
2>log\log0recv.c(2984): error C2466: cannot allocate an array of constant size 0
2>log\log0recv.c(2984): error C2133: 'log_hdr_buf_base' : unknown size

I am not sure what is difference, but I do not have such errors when I compile MySQL 5.5.10

Tags: win Edit Tag help
tags: added: win

Assigning to myself as I've already started working on it.

Additional Windows issue: response_time_distribution needed to be ported to use winapi interlocked integer operations instead of GCC builtins.

Further issues:
- sql_no_fcache.patch had some issues with #ifdef __linux__ so not everything was disabled on non-Linux systems.
- userstat.patch used non-portable gettimeofday() call, replaced with my_getsystime()
- slow_extended.patch opt_slow_query_log_timestamp_precision variable was of type ulonglong - which fails on systems with sizeof(ulonglong) != sizeof(ulong)

I Will resume work on this after bug 737947 is fixed.

Patch from Kristian Nielsen:

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/'
--- storage/innobase/handler/ 2011-12-15 09:34:14 +0000
+++ storage/innobase/handler/ 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,
- "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."
- "No effect for this build.",
+#define TMP_STR "No effect for this build."
+static MYSQL_SYSVAR_LONG(kill_idle_transaction, srv_kill_idle_transaction,
  NULL, NULL, 0, 0, LONG_MAX, 0);
+#undef TMP_STR

 static MYSQL_SYSVAR_LONG(file_io_threads, innobase_file_io_threads,

Stewart Smith (stewart) wrote :

Just a FYI, since we're not officially supporting Windows as a platform at the moment, I've marked this as "Won't Fix" but we'll no doubt look back at it if/when we officially do to Windows.

See also bug 1086282.

Percona now uses JIRA for bug reports so this bug report is migrated to:

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers