Windows compilations errors

Bug #737895 reported by Vadim Tkachenko
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.1
Won't Fix
Wishlist
Unassigned
5.5
Won't Fix
Wishlist
Unassigned
5.6
Triaged
Wishlist
Unassigned
5.7
Triaged
Wishlist
Unassigned

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
tags: added: win
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

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

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

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

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

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)

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

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

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

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

Revision history for this message
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.

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

See also bug 1086282.

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

See also bug 1087218 and bug 1087202.

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

See also bug 1088954 and bug 1088929.

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-2355

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.