diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2014-04-30 11:05:11 +0200 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2014-04-30 11:05:11 +0200 |
commit | 006dfe52822ee3550a42a9338ad29aca012945f4 (patch) | |
tree | eaab8b64101c8c34eba979d46530c2f71960f0aa /storage/connect/tabmysql.cpp | |
parent | e7c7256d1d67125921d9f688a382aef873f5b9ce (diff) | |
parent | f3af6da9765a4541d63de91e8a848d3c3116e957 (diff) | |
download | mariadb-git-006dfe52822ee3550a42a9338ad29aca012945f4.tar.gz |
- Commit merged files (HUGE to use instead of storing MySQL result sets)
modified:
storage/connect/myconn.cpp
storage/connect/myconn.h
storage/connect/tabmysql.cpp
storage/connect/tabmysql.h
storage/connect/xindex.cpp
storage/connect/xindex.h
Diffstat (limited to 'storage/connect/tabmysql.cpp')
-rw-r--r-- | storage/connect/tabmysql.cpp | 53 |
1 files changed, 28 insertions, 25 deletions
diff --git a/storage/connect/tabmysql.cpp b/storage/connect/tabmysql.cpp index e8551b820e9..213929be156 100644 --- a/storage/connect/tabmysql.cpp +++ b/storage/connect/tabmysql.cpp @@ -84,10 +84,11 @@ MYSQLDEF::MYSQLDEF(void) Username = NULL; Password = NULL; Portnumber = 0; - Isview = FALSE; - Bind = FALSE; - Delayed = FALSE; - Xsrc = FALSE; + Isview = false; + Bind = false; + Delayed = false; + Xsrc = false; + Huge = false; } // end of MYSQLDEF constructor /***********************************************************************/ @@ -329,7 +330,7 @@ bool MYSQLDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff) } else { // MYSQL access from a PROXY table Database = GetStringCatInfo(g, "Database", "*"); - Isview = GetBoolCatInfo("View", FALSE); + Isview = GetBoolCatInfo("View", false); // We must get other connection parms from the calling table Remove_tshp(Cat); @@ -363,7 +364,8 @@ bool MYSQLDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff) // Specific for command executing tables Xsrc = GetBoolCatInfo("Execsrc", false); Mxr = GetIntCatInfo("Maxerr", 0); - return FALSE; + Huge = GetBoolCatInfo("Huge", false); + return false; } // end of DefineAM /***********************************************************************/ @@ -401,6 +403,7 @@ TDBMYSQL::TDBMYSQL(PMYDEF tdp) : TDBASE(tdp) Isview = tdp->Isview; Prep = tdp->Bind; Delayed = tdp->Delayed; + Myc.m_Use = tdp->Huge; } else { Host = NULL; Database = NULL; @@ -412,15 +415,15 @@ TDBMYSQL::TDBMYSQL(PMYDEF tdp) : TDBASE(tdp) Qrystr = NULL; Quoted = 0; Port = 0; - Isview = FALSE; - Prep = FALSE; - Delayed = FALSE; + Isview = false; + Prep = false; + Delayed = false; } // endif tdp Bind = NULL; Query = NULL; Qbuf = NULL; - Fetched = FALSE; + Fetched = false; m_Rc = RC_FX; AftRows = 0; N = -1; @@ -555,17 +558,17 @@ bool TDBMYSQL::MakeInsert(PGLOBAL g) char *colist, *valist = NULL; char *tk = "`"; int len = 0, qlen = 0; - bool b = FALSE; + bool b = false; PCOL colp; if (Query) - return FALSE; // already done + return false; // already done for (colp = Columns; colp; colp = colp->GetNext()) if (!colp->IsSpecial()) { // if (colp->IsSpecial()) { // strcpy(g->Message, MSG(NO_SPEC_COL)); -// return TRUE; +// return true; // } else { len += (strlen(colp->GetName()) + 4); ((PMYCOL)colp)->Rank = Nparm++; @@ -581,8 +584,8 @@ bool TDBMYSQL::MakeInsert(PGLOBAL g) #else // !MYSQL_PREPARED_STATEMENTS strcpy(g->Message, "Prepared statements not used (not supported)"); PushWarning(g, this); - Prep = FALSE; -#endif // !MYSQL_PREPARED_STATEMENTS + Prep = false; +#endif // !MYSQL_PREPARED_STATEMENTS } // endif Prep for (colp = Columns; colp; colp = colp->GetNext()) { @@ -590,7 +593,7 @@ bool TDBMYSQL::MakeInsert(PGLOBAL g) strcat(colist, ", "); if (Prep) strcat(valist, ","); } else - b = TRUE; + b = true; strcat(strcat(strcat(colist, tk), colp->GetName()), tk); @@ -628,7 +631,7 @@ bool TDBMYSQL::MakeInsert(PGLOBAL g) Qbuf = (char *)PlugSubAlloc(g, NULL, qlen); } // endelse Prep - return FALSE; + return false; } // end of MakeInsert /***********************************************************************/ @@ -906,9 +909,9 @@ bool TDBMYSQL::SetColumnRanks(PGLOBAL g) { for (PCOL colp = Columns; colp; colp = colp->GetNext()) if (((PMYCOL)colp)->FindRank(g)) - return TRUE; + return true; - return FALSE; + return false; } // end of SetColumnRanks /***********************************************************************/ @@ -1234,7 +1237,7 @@ bool MYSQLCOL::SetBuffer(PGLOBAL g, PVAL value, bool ok, bool check) { if (!(To_Val = value)) { sprintf(g->Message, MSG(VALUE_ERROR), Name); - return TRUE; + return true; } else if (Buf_Type == value->GetType()) { // Values are of the (good) column type if (Buf_Type == TYPE_DATE) { @@ -1254,12 +1257,12 @@ bool MYSQLCOL::SetBuffer(PGLOBAL g, PVAL value, bool ok, bool check) if (check) { sprintf(g->Message, MSG(TYPE_VALUE_ERR), Name, GetTypeName(Buf_Type), GetTypeName(value->GetType())); - return TRUE; + return true; } // endif check newval: if (InitValue(g)) // Allocate the matching value block - return TRUE; + return true; } // endif's Value, Buf_Type @@ -1270,7 +1273,7 @@ bool MYSQLCOL::SetBuffer(PGLOBAL g, PVAL value, bool ok, bool check) // Set the Column Status = (ok) ? BUF_EMPTY : BUF_NO; - return FALSE; + return false; } // end of SetBuffer /***********************************************************************/ @@ -1318,7 +1321,7 @@ void MYSQLCOL::ReadColumn(PGLOBAL g) longjmp(g->jumper[g->jump_level], 11); } else - tdbp->Fetched = TRUE; + tdbp->Fetched = true; if ((buf = ((PTDBMY)To_Tdb)->Myc.GetCharField(Rank))) { if (trace > 1) @@ -1355,7 +1358,7 @@ void MYSQLCOL::WriteColumn(PGLOBAL g) /* Do convert the column value if necessary. */ /*********************************************************************/ if (Value != To_Val) - Value->SetValue_pval(To_Val, FALSE); // Convert the inserted value + Value->SetValue_pval(To_Val, false); // Convert the inserted value #if defined(MYSQL_PREPARED_STATEMENTS) if (((PTDBMY)To_Tdb)->Prep) { |