Commit 0bc02450 authored by unknown's avatar unknown
Browse files

windows compilation fixes

parent 47fd010f
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -353,6 +353,8 @@ inline double ulonglong2double(ulonglong value)

#define DO_NOT_REMOVE_THREAD_WRAPPERS
#define thread_safe_increment(V,L) InterlockedIncrement((long*) &(V))
#define thread_safe_decrement(V,L) InterlockedDecrement((long*) &(V))
#define thread_safe_dec_and_test(V, L) thread_safe_decrement(V,L)
/* The following is only used for statistics, so it should be good enough */
#ifdef __NT__  /* This should also work on Win98 but .. */
#define thread_safe_add(V,C,L) InterlockedExchangeAdd((long*) &(V),(C))
@@ -366,6 +368,7 @@ inline double ulonglong2double(ulonglong value)
#define statistic_add(V,C,L)	 (V)+=(C)
#endif
#define statistic_increment(V,L) thread_safe_increment((V),(L))
#define statistic_decrement(V,L) thread_safe_decrement((V),(L))

#define shared_memory_buffer_length 16000
#define default_shared_memory_base_name "MYSQL"
+2 −1
Original line number Diff line number Diff line
@@ -811,7 +811,8 @@ my_bool my_gethwaddr(uchar *to);
/* not a complete set of mmap() flags, but only those that nesessary */
#define PROT_READ        1
#define PROT_WRITE       2
#define MAP_NOSYNC       0x800
#define MAP_SHARED       0x0001
#define MAP_NOSYNC       0x0800
#define MAP_FAILED       ((void *)-1)
#define MS_SYNC          0x0000

+1 −0
Original line number Diff line number Diff line
@@ -215,6 +215,7 @@ bool berkeley_end(void)
static int berkeley_close_connection(THD *thd)
{
  my_free((gptr)thd->ha_data[berkeley_hton.slot], MYF(0));
  return 0;
}

bool berkeley_flush_logs()
+3 −3
Original line number Diff line number Diff line
@@ -2652,7 +2652,7 @@ ha_innobase::write_row(
			no need to re-acquire locks on it. */

			/* Altering to InnoDB format */
			innobase_commit(user_thd, prebuilt->trx);
                        innobase_commit(user_thd, 1);
			/* Note that this transaction is still active. */
			prebuilt->trx->active_trans = 1;
			/* We will need an IX lock on the destination table. */
@@ -2667,7 +2667,7 @@ ha_innobase::write_row(

			/* Commit the transaction.  This will release the table
			locks, so they have to be acquired again. */
			innobase_commit(user_thd, prebuilt->trx);
                        innobase_commit(user_thd, 1);
			/* Note that this transaction is still active. */
			prebuilt->trx->active_trans = 1;
			/* Re-acquire the table lock on the source table. */
@@ -4247,7 +4247,7 @@ ha_innobase::delete_all_rows(void)
		goto fallback;
	}

	innobase_commit(thd, trx);
	innobase_commit(thd, 1);

	error = convert_error_code_to_mysql(error, NULL);

+1 −1
Original line number Diff line number Diff line
@@ -757,7 +757,7 @@ int ha_recover(HASH *commit_list)
        if (!x) // not "mine" - that is generated by external TM
          continue;
        if (commit_list ?
            hash_search(commit_list, (char *)&x, sizeof(x)) != 0 :
            hash_search(commit_list, (byte *)&x, sizeof(x)) != 0 :
            tc_heuristic_recover == TC_HEURISTIC_RECOVER_COMMIT)
          (*(*ht)->commit_by_xid)(list+i);
        else
Loading