← Back to team overview

maria-developers team mailing list archive

Re: Fix windows compiler errors

 

Den 09-04-2010 11:58, Michael Widenius skrev:

Hi!

"Bo" == Bo Thorsen<bo@xxxxxxxxxxxx>  writes:

Bo>  Hi all,
Bo>  When compiling lp:maria on windows, there are a couple of errors. The
Bo>  attached patch fixes those.

Bo>  Part of this patch fixes https://bugs.launchpad.net/maria/+bug/550974,
Bo>  and it's done the way Sanja suggested.

Bo>  Bo.


=== modified file storage/maria/ma_loghandler.c
--- storage/maria/ma_loghandler.c	2010-03-30 12:36:49 +0000
+++ storage/maria/ma_loghandler.c	2010-04-07 12:12:49 +0000
@@ -1211,9 +1211,10 @@
    for (file= from_file; file<= to_file; file++)
    {
      LOGHANDLER_FILE_INFO info;
+	File fd;
      LINT_INIT(info.max_lsn);

-    File fd= open_logfile_by_number_no_cache(file);
+    fd= open_logfile_by_number_no_cache(file);
      if ((fd<  0) ||
          ((translog_read_file_header(&info, fd) ||
            (cmp_translog_addr(lsn, info.max_lsn)>  0&&

@@ -1396,8 +1397,9 @@

    {
      LOGHANDLER_FILE_INFO info;
+	File fd;
      LINT_INIT_STRUCT(info);
-    File fd= open_logfile_by_number_no_cache(file);
+    fd= open_logfile_by_number_no_cache(file);
      if ((fd<  0) ||
          (translog_read_file_header(&info, fd) | my_close(fd, MYF(MY_WME))))
      {

Part of the above is already fixed in 5.1 (the same way).

Please be careful regarding this when you do a merge.

Yes, I did see that you fixed one of these already. I removed that hunk from the patch before pushing.

Bo.




References