mirror of
https://github.com/MariaDB/server.git
synced 2025-12-07 17:42:39 +03:00
commit git 167, 168 and 169 msg
This commit is contained in:
@@ -4062,6 +4062,11 @@ int ha_connect::info(uint flag)
|
||||
|
||||
DBUG_ENTER("ha_connect::info");
|
||||
|
||||
if (!g) {
|
||||
my_message(ER_UNKNOWN_ERROR, "Cannot get g pointer", MYF(0));
|
||||
DBUG_RETURN(HA_ERR_INTERNAL_ERROR);
|
||||
} // endif g
|
||||
|
||||
if (trace)
|
||||
htrc("%p In info: flag=%u valid_info=%d\n", this, flag, valid_info);
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -10,4 +10,4 @@ let $SECUREDIR= `select @@secure_file_priv`;
|
||||
INSERT INTO t1 VALUES (10);
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
--remove_file $SECUREDIR/t1.dbf
|
||||
--remove_file $MYSQL_TMP_DIR/t1.dbf
|
||||
|
||||
@@ -1646,7 +1646,7 @@ int TDBDOS::TestBlock(PGLOBAL g)
|
||||
/***********************************************************************/
|
||||
int TDBDOS::MakeIndex(PGLOBAL g, PIXDEF pxdf, bool add)
|
||||
{
|
||||
int k, n;
|
||||
int k, n, rc = RC_OK;
|
||||
bool fixed, doit, sep, b = (pxdf != NULL);
|
||||
PCOL *keycols, colp;
|
||||
PIXDEF xdp, sxp = NULL;
|
||||
@@ -1691,6 +1691,7 @@ int TDBDOS::MakeIndex(PGLOBAL g, PIXDEF pxdf, bool add)
|
||||
} else if (!(pxdf = dfp->GetIndx()))
|
||||
return RC_INFO; // No index to make
|
||||
|
||||
try {
|
||||
// Allocate all columns that will be used by indexes.
|
||||
// This must be done before opening the table so specific
|
||||
// column initialization can be done (in particular by TDBVCT)
|
||||
@@ -1776,10 +1777,19 @@ int TDBDOS::MakeIndex(PGLOBAL g, PIXDEF pxdf, bool add)
|
||||
} else
|
||||
return RC_INFO; // Error or Physical table does not exist
|
||||
|
||||
} catch (int n) {
|
||||
if (trace)
|
||||
htrc("Exception %d: %s\n", n, g->Message);
|
||||
rc = RC_FX;
|
||||
} catch (const char *msg) {
|
||||
strcpy(g->Message, msg);
|
||||
rc = RC_FX;
|
||||
} // end catch
|
||||
|
||||
if (Use == USE_OPEN)
|
||||
CloseDB(g);
|
||||
|
||||
return RC_OK;
|
||||
return rc;
|
||||
|
||||
err:
|
||||
if (sxp)
|
||||
|
||||
@@ -464,7 +464,7 @@ bool XINDEX::Make(PGLOBAL g, PIXDEF sxp)
|
||||
if (ApplyFilter(g, filp))
|
||||
break;
|
||||
|
||||
// passthru
|
||||
// fall through
|
||||
case RC_NF:
|
||||
continue;
|
||||
case RC_EF:
|
||||
@@ -3009,6 +3009,7 @@ KXYCOL::KXYCOL(PKXBASE kp) : To_Keys(Keys.Memp),
|
||||
bool KXYCOL::Init(PGLOBAL g, PCOL colp, int n, bool sm, int kln)
|
||||
{
|
||||
int len = colp->GetLength(), prec = colp->GetScale();
|
||||
bool un = colp->IsUnsigned();
|
||||
|
||||
// Currently no indexing on NULL columns
|
||||
if (colp->IsNullable() && kln) {
|
||||
@@ -3028,7 +3029,7 @@ bool KXYCOL::Init(PGLOBAL g, PCOL colp, int n, bool sm, int kln)
|
||||
// Allocate the Value object used when moving items
|
||||
Type = colp->GetResultType();
|
||||
|
||||
if (!(Valp = AllocateValue(g, Type, len, prec, colp->IsUnsigned())))
|
||||
if (!(Valp = AllocateValue(g, Type, len, prec, un)))
|
||||
return true;
|
||||
|
||||
Klen = Valp->GetClen();
|
||||
@@ -3044,7 +3045,7 @@ bool KXYCOL::Init(PGLOBAL g, PCOL colp, int n, bool sm, int kln)
|
||||
// Currently we set it to true to be compatible with QRY blocks,
|
||||
// and the one before last is to enable length/type checking, set to
|
||||
// true if not a prefix key.
|
||||
Kblp = AllocValBlock(g, To_Keys, Type, n, len, prec, !Prefix, true);
|
||||
Kblp = AllocValBlock(g, To_Keys, Type, n, len, prec, !Prefix, true, un);
|
||||
Asc = sm; // Sort mode: Asc=true Desc=false
|
||||
Ndf = n;
|
||||
|
||||
@@ -3065,6 +3066,7 @@ bool KXYCOL::Init(PGLOBAL g, PCOL colp, int n, bool sm, int kln)
|
||||
BYTE* KXYCOL::MapInit(PGLOBAL g, PCOL colp, int *n, BYTE *m)
|
||||
{
|
||||
int len = colp->GetLength(), prec = colp->GetScale();
|
||||
bool un = colp->IsUnsigned();
|
||||
|
||||
if (n[3] && colp->GetLength() > n[3]
|
||||
&& colp->GetResultType() == TYPE_STRING) {
|
||||
@@ -3079,7 +3081,7 @@ BYTE* KXYCOL::MapInit(PGLOBAL g, PCOL colp, int *n, BYTE *m)
|
||||
this, colp, Type, n[0], len, m);
|
||||
|
||||
// Allocate the Value object used when moving items
|
||||
Valp = AllocateValue(g, Type, len, prec, colp->IsUnsigned());
|
||||
Valp = AllocateValue(g, Type, len, prec, un);
|
||||
Klen = Valp->GetClen();
|
||||
|
||||
if (n[2]) {
|
||||
@@ -3088,7 +3090,7 @@ BYTE* KXYCOL::MapInit(PGLOBAL g, PCOL colp, int *n, BYTE *m)
|
||||
Bkeys.Sub = true;
|
||||
|
||||
// Allocate the Valblk containing initial block key values
|
||||
Blkp = AllocValBlock(g, To_Bkeys, Type, n[2], len, prec, true, true);
|
||||
Blkp = AllocValBlock(g, To_Bkeys, Type, n[2], len, prec, true, true, un);
|
||||
} // endif nb
|
||||
|
||||
Keys.Size = n[0] * Klen;
|
||||
@@ -3099,7 +3101,7 @@ BYTE* KXYCOL::MapInit(PGLOBAL g, PCOL colp, int *n, BYTE *m)
|
||||
// by blanks (if true) or keep the zero ending char (if false).
|
||||
// Currently we set it to true to be compatible with QRY blocks,
|
||||
// and last one to enable type checking (no conversion).
|
||||
Kblp = AllocValBlock(g, To_Keys, Type, n[0], len, prec, !Prefix, true);
|
||||
Kblp = AllocValBlock(g, To_Keys, Type, n[0], len, prec, !Prefix, true, un);
|
||||
|
||||
if (n[1]) {
|
||||
Koff.Size = n[1] * sizeof(int);
|
||||
|
||||
Reference in New Issue
Block a user