Commit 6f32b28b authored by Sergei Krivonos's avatar Sergei Krivonos Committed by SergMariaDB

Xcode compatibility update

parent 8f04ec28
...@@ -338,6 +338,7 @@ x86/ ...@@ -338,6 +338,7 @@ x86/
build/ build/
bld/ bld/
[Bb]in/ [Bb]in/
/cmake-build-debug/
[Oo]bj/ [Oo]bj/
# Roslyn cache directories # Roslyn cache directories
...@@ -518,4 +519,5 @@ compile_commands.json ...@@ -518,4 +519,5 @@ compile_commands.json
# Visual Studio Code workspace # Visual Studio Code workspace
.vscode/ .vscode/
/.idea/
.cache/clangd .cache/clangd
...@@ -52,6 +52,9 @@ struct my_context { ...@@ -52,6 +52,9 @@ struct my_context {
#ifdef MY_CONTEXT_USE_UCONTEXT #ifdef MY_CONTEXT_USE_UCONTEXT
#if defined(__APPLE__) && !defined(_XOPEN_SOURCE)
#define _XOPEN_SOURCE
#endif
#include <ucontext.h> #include <ucontext.h>
struct my_context { struct my_context {
......
...@@ -29,6 +29,10 @@ ...@@ -29,6 +29,10 @@
#endif #endif
#ifdef MY_CONTEXT_USE_UCONTEXT #ifdef MY_CONTEXT_USE_UCONTEXT
#ifdef __APPLE__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
/* /*
The makecontext() only allows to pass integers into the created context :-( The makecontext() only allows to pass integers into the created context :-(
We want to pass pointers, so we do it this kinda hackish way. We want to pass pointers, so we do it this kinda hackish way.
...@@ -154,6 +158,9 @@ my_context_destroy(struct my_context *c) ...@@ -154,6 +158,9 @@ my_context_destroy(struct my_context *c)
DBUG_FREE_CODE_STATE(&c->dbug_state); DBUG_FREE_CODE_STATE(&c->dbug_state);
} }
#ifdef __APPLE__
#pragma GCC diagnostic pop
#endif
#endif /* MY_CONTEXT_USE_UCONTEXT */ #endif /* MY_CONTEXT_USE_UCONTEXT */
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include <mysql.h> #include <mysql.h>
#include <sql_error.h> #include <sql_error.h>
#include <stdio.h> #include <stdio.h>
#include <cassert>
#include "bsonudf.h" #include "bsonudf.h"
...@@ -621,7 +622,7 @@ PVAL BJNX::GetCalcValue(PGLOBAL g, PBVAL bap, int n) ...@@ -621,7 +622,7 @@ PVAL BJNX::GetCalcValue(PGLOBAL g, PBVAL bap, int n)
{ {
// For calculated arrays, a local Value must be used // For calculated arrays, a local Value must be used
int lng = 0; int lng = 0;
short type, prec = 0; short type = 0, prec = 0;
bool b = n < Nod - 1; bool b = n < Nod - 1;
PVAL valp; PVAL valp;
PBVAL vlp, vp; PBVAL vlp, vp;
...@@ -690,7 +691,7 @@ PVAL BJNX::GetCalcValue(PGLOBAL g, PBVAL bap, int n) ...@@ -690,7 +691,7 @@ PVAL BJNX::GetCalcValue(PGLOBAL g, PBVAL bap, int n)
break; break;
default: default:
break; DBUG_ASSERT(!"Implement new op type support.");
} // endswitch Op } // endswitch Op
return valp = AllocateValue(g, type, lng, prec); return valp = AllocateValue(g, type, lng, prec);
...@@ -4978,7 +4979,7 @@ char *bbin_array_add(UDF_INIT *initid, UDF_ARGS *args, char *result, ...@@ -4978,7 +4979,7 @@ char *bbin_array_add(UDF_INIT *initid, UDF_ARGS *args, char *result,
uint n = 2; uint n = 2;
int* x = GetIntArgPtr(g, args, n); int* x = GetIntArgPtr(g, args, n);
BJNX bnx(g, NULL, TYPE_STRING); BJNX bnx(g, NULL, TYPE_STRING);
PBVAL jarp, top, jvp = NULL; PBVAL jarp = NULL, top = NULL, jvp = NULL;
PBVAL jsp = bnx.MakeValue(args, 0, true, &top); PBVAL jsp = bnx.MakeValue(args, 0, true, &top);
if (bnx.CheckPath(g, args, jsp, jvp, 2)) if (bnx.CheckPath(g, args, jsp, jvp, 2))
...@@ -5611,7 +5612,7 @@ char *bbin_object_values(UDF_INIT *initid, UDF_ARGS *args, char *result, ...@@ -5611,7 +5612,7 @@ char *bbin_object_values(UDF_INIT *initid, UDF_ARGS *args, char *result,
if (!bsp) { if (!bsp) {
if (!CheckMemory(g, initid, args, 1, true, true)) { if (!CheckMemory(g, initid, args, 1, true, true)) {
BJNX bnx(g); BJNX bnx(g);
PBVAL top, jarp; PBVAL top, jarp = NULL;
PBVAL jvp = bnx.MakeValue(args, 0, true, &top); PBVAL jvp = bnx.MakeValue(args, 0, true, &top);
if (jvp->Type == TYPE_JOB) { if (jvp->Type == TYPE_JOB) {
......
...@@ -193,8 +193,8 @@ static void PROFILE_Save( FILE *file, PROFILESECTION *section ) ...@@ -193,8 +193,8 @@ static void PROFILE_Save( FILE *file, PROFILESECTION *section )
secno++; secno++;
} }
for (key = section->key; key; key = key->next) for (key= section->key; key; key= key->next) {
if (key->name && key->name[0]) { if (key->name[0]) {
fprintf(file, "%s", SVP(key->name)); fprintf(file, "%s", SVP(key->name));
if (key->value) if (key->value)
...@@ -202,7 +202,7 @@ static void PROFILE_Save( FILE *file, PROFILESECTION *section ) ...@@ -202,7 +202,7 @@ static void PROFILE_Save( FILE *file, PROFILESECTION *section )
fprintf(file, "\n"); fprintf(file, "\n");
} // endif key->name } // endif key->name
}
} // endfor section } // endfor section
} // end of PROFILE_Save } // end of PROFILE_Save
......
...@@ -871,7 +871,7 @@ PBVAL BCUTIL::MakeBson(PGLOBAL g, PBVAL jsp, int n) ...@@ -871,7 +871,7 @@ PBVAL BCUTIL::MakeBson(PGLOBAL g, PBVAL jsp, int n)
/***********************************************************************/ /***********************************************************************/
PBVAL BCUTIL::GetRowValue(PGLOBAL g, PBVAL row, int i) PBVAL BCUTIL::GetRowValue(PGLOBAL g, PBVAL row, int i)
{ {
int nod = Cp->Nod, n = nod - 1; int nod = Cp->Nod;
JNODE *nodes = Cp->Nodes; JNODE *nodes = Cp->Nodes;
PBVAL arp; PBVAL arp;
PBVAL bvp = NULL; PBVAL bvp = NULL;
......
...@@ -2470,13 +2470,13 @@ row_upd_sec_index_entry( ...@@ -2470,13 +2470,13 @@ row_upd_sec_index_entry(
case DB_LOCK_WAIT_TIMEOUT: case DB_LOCK_WAIT_TIMEOUT:
WSREP_DEBUG("Foreign key check fail: " WSREP_DEBUG("Foreign key check fail: "
"%s on table %s index %s query %s", "%s on table %s index %s query %s",
ut_strerr(err), index->name, index->table->name, ut_strerr(err), index->name(), index->table->name.m_name,
wsrep_thd_query(trx->mysql_thd)); wsrep_thd_query(trx->mysql_thd));
break; break;
default: default:
WSREP_ERROR("Foreign key check fail: " WSREP_ERROR("Foreign key check fail: "
"%s on table %s index %s query %s", "%s on table %s index %s query %s",
ut_strerr(err), index->name, index->table->name, ut_strerr(err), index->name(), index->table->name.m_name,
wsrep_thd_query(trx->mysql_thd)); wsrep_thd_query(trx->mysql_thd));
break; break;
} }
...@@ -2806,14 +2806,14 @@ row_upd_clust_rec_by_insert( ...@@ -2806,14 +2806,14 @@ row_upd_clust_rec_by_insert(
case DB_LOCK_WAIT_TIMEOUT: case DB_LOCK_WAIT_TIMEOUT:
WSREP_DEBUG("Foreign key check fail: " WSREP_DEBUG("Foreign key check fail: "
"%s on table %s index %s query %s", "%s on table %s index %s query %s",
ut_strerr(err), index->name, index->table->name, ut_strerr(err), index->name(), index->table->name.m_name,
wsrep_thd_query(trx->mysql_thd)); wsrep_thd_query(trx->mysql_thd));
goto err_exit; goto err_exit;
default: default:
WSREP_ERROR("Foreign key check fail: " WSREP_ERROR("Foreign key check fail: "
"%s on table %s index %s query %s", "%s on table %s index %s query %s",
ut_strerr(err), index->name, index->table->name, ut_strerr(err), index->name(), index->table->name.m_name,
wsrep_thd_query(trx->mysql_thd)); wsrep_thd_query(trx->mysql_thd));
goto err_exit; goto err_exit;
...@@ -3037,13 +3037,13 @@ row_upd_del_mark_clust_rec( ...@@ -3037,13 +3037,13 @@ row_upd_del_mark_clust_rec(
case DB_LOCK_WAIT_TIMEOUT: case DB_LOCK_WAIT_TIMEOUT:
WSREP_DEBUG("Foreign key check fail: " WSREP_DEBUG("Foreign key check fail: "
"%d on table %s index %s query %s", "%d on table %s index %s query %s",
err, index->name, index->table->name, err, index->name(), index->table->name.m_name,
wsrep_thd_query(trx->mysql_thd)); wsrep_thd_query(trx->mysql_thd));
break; break;
default: default:
WSREP_ERROR("Foreign key check fail: " WSREP_ERROR("Foreign key check fail: "
"%d on table %s index %s query %s", "%d on table %s index %s query %s",
err, index->name, index->table->name, err, index->name(), index->table->name.m_name,
wsrep_thd_query(trx->mysql_thd)); wsrep_thd_query(trx->mysql_thd));
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment