Modify the sqlite3VdbeUnpackRecord() interface to force the temporary

space to be 8-byte aligned.  This might be important for Sparc.
Ticket #3318. (CVS 5573)

FossilOrigin-Name: 00b177985ee08f13a7781d095936da3beaf0408c
This commit is contained in:
drh 2008-08-20 22:06:47 +00:00
parent 41d3027ce8
commit 23f79d061f
6 changed files with 22 additions and 21 deletions

View File

@ -1,5 +1,5 @@
C Comment\sand\sfunction\snaming\stweaks\sto\spcache.\s\sNo\sfunctionality\schanges.\s(CVS\s5572)
D 2008-08-20T21:47:46
C Modify\sthe\ssqlite3VdbeUnpackRecord()\sinterface\sto\sforce\sthe\stemporary\nspace\sto\sbe\s8-byte\saligned.\s\sThis\smight\sbe\simportant\sfor\sSparc.\nTicket\s#3318.\s(CVS\s5573)
D 2008-08-20T22:06:48
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in 0b1c022000f55221454a7846022f11674d8024bf
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@ -96,7 +96,7 @@ F src/attach.c db3f4a60538733c1e4dcb9d0217a6e0d6ccd615b
F src/auth.c c8b2ab5c8bad4bd90ed7c294694f48269162c627
F src/bitvec.c 95c86bd18d8fedf0533f5af196192546e10a7e7d
F src/btmutex.c 709cad2cdca0afd013f0f612363810e53f59ec53
F src/btree.c c536edea3dd8a9f5f56101ca66cd5dfe699a5d7b
F src/btree.c 3078f7a5c7cde1e74d884dfa57410125d21586fb
F src/btree.h 6371c5e599fab391a150c96afbc10062b276d107
F src/btreeInt.h ab18c7b4980314e9e4b402e5dcde09f3c2545576
F src/build.c 160c71acca8f643f436ed6c1ee2f684c88df4dfe
@ -186,11 +186,11 @@ F src/update.c 9e3786e76825bd7fa22528556cc1c467cd428075
F src/utf.c c63e6f69082f85c19ab88d62dedaf91d71ac1a50
F src/util.c afe659ccc05d1f8af9e8631dabfec3ee3a7144af
F src/vacuum.c ef342828002debc97514617af3424aea8ef8522c
F src/vdbe.c e2dd0c78c5579e23db49ed8265f0b44d7b22c51d
F src/vdbe.h 17bcc2b41082f9b99718b3757cbf97145a72023a
F src/vdbe.c ae37f601426e01c4cdf6f650f465928bc18ad0c9
F src/vdbe.h 41c99aaad9167c1b5431993db446de74b2f71fc3
F src/vdbeInt.h b48c74d86a9fb62b707a3186ccca76bb32f1c6be
F src/vdbeapi.c f21971516880fd3a10821b2cdd0e64a5a63952c9
F src/vdbeaux.c ba13cc1e663d3dd12a720d108eac14d792ad7680
F src/vdbeaux.c 45a53a4459c01db4e6befc977952346bfef405c3
F src/vdbeblob.c f93110888ddc246215e9ba1f831d3d375bfd8355
F src/vdbefifo.c 20fda2a7c4c0bcee1b90eb7e545fefcdbf2e1de7
F src/vdbemem.c c37b2a266a49eaf0c0f5080157f9f1a908fdaac3
@ -623,7 +623,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c 1dbced29de5f59ba2ebf877edcadf171540374d1
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
P 71992f4a3723418df5f16093aec92f1f95f0b604
R 1864568c91564440b5d8de8411bca79f
P 4b0e67d397236c740bea88ad3a5912abe896322a
R dd5981fcfab83bf09d88f574f4947590
U drh
Z 8ae3b66a71a20677fcd2b2a4e9762a73
Z 7d447f2bb72d5431ebd4715c4fa2ad19

View File

@ -1 +1 @@
4b0e67d397236c740bea88ad3a5912abe896322a
00b177985ee08f13a7781d095936da3beaf0408c

View File

@ -9,7 +9,7 @@
** May you share freely, never taking more than you give.
**
*************************************************************************
** $Id: btree.c,v 1.498 2008/08/20 14:49:24 danielk1977 Exp $
** $Id: btree.c,v 1.499 2008/08/20 22:06:48 drh Exp $
**
** This file implements a external (disk-based) database using BTrees.
** See the header comment on "btreeInt.h" for additional information.
@ -3831,11 +3831,11 @@ int sqlite3BtreeMoveto(
){
int rc; /* Status code */
UnpackedRecord *pIdxKey; /* Unpacked index key */
char aSpace[200]; /* Temp space for pIdxKey - to avoid a malloc */
UnpackedRecord aSpace[16]; /* Temp space for pIdxKey - to avoid a malloc */
if( pKey ){
pIdxKey = sqlite3VdbeRecordUnpack(pCur->pKeyInfo, nKey, pKey,
aSpace, sizeof(aSpace));
aSpace, sizeof(aSpace));
if( pIdxKey==0 ) return SQLITE_NOMEM;
}else{
pIdxKey = 0;

View File

@ -43,7 +43,7 @@
** in this file for details. If in doubt, do not deviate from existing
** commenting and indentation practices when changing or adding code.
**
** $Id: vdbe.c,v 1.775 2008/08/13 19:11:48 drh Exp $
** $Id: vdbe.c,v 1.776 2008/08/20 22:06:48 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@ -555,7 +555,7 @@ int sqlite3VdbeExec(
#ifndef SQLITE_OMIT_PROGRESS_CALLBACK
int nProgressOps = 0; /* Opcodes executed since progress callback. */
#endif
char zTempSpace[200]; /* Space to hold a transient UnpackedRecord */
UnpackedRecord aTempRec[16]; /* Space to hold a transient UnpackedRecord */
assert( p->magic==VDBE_MAGIC_RUN ); /* sqlite3_step() verifies this */
@ -3058,7 +3058,7 @@ case OP_Found: { /* jump, in3 */
assert( pC->isTable==0 );
assert( pIn3->flags & MEM_Blob );
pIdxKey = sqlite3VdbeRecordUnpack(pC->pKeyInfo, pIn3->n, pIn3->z,
zTempSpace, sizeof(zTempSpace));
aTempRec, sizeof(aTempRec));
if( pIdxKey==0 ){
goto no_mem;
}
@ -3129,7 +3129,7 @@ case OP_IsUnique: { /* jump, in3 */
*/
assert( pK->flags & MEM_Blob );
pIdxKey = sqlite3VdbeRecordUnpack(pCx->pKeyInfo, pK->n, pK->z,
zTempSpace, sizeof(zTempSpace));
aTempRec, sizeof(aTempRec));
if( pIdxKey==0 ){
goto no_mem;
}

View File

@ -15,7 +15,7 @@
** or VDBE. The VDBE implements an abstract machine that runs a
** simple program to access and modify the underlying database.
**
** $Id: vdbe.h,v 1.137 2008/08/13 19:11:48 drh Exp $
** $Id: vdbe.h,v 1.138 2008/08/20 22:06:48 drh Exp $
*/
#ifndef _SQLITE_VDBE_H_
#define _SQLITE_VDBE_H_
@ -187,7 +187,8 @@ void sqlite3VdbeSwap(Vdbe*,Vdbe*);
#ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT
int sqlite3VdbeReleaseMemory(int);
#endif
UnpackedRecord *sqlite3VdbeRecordUnpack(KeyInfo*,int,const void*,void*,int);
UnpackedRecord *sqlite3VdbeRecordUnpack(KeyInfo*,int,const void*,
UnpackedRecord*,int);
void sqlite3VdbeDeleteUnpackedRecord(UnpackedRecord*);
int sqlite3VdbeRecordCompare(int,const void*,UnpackedRecord*);

View File

@ -14,7 +14,7 @@
** to version 2.8.7, all this code was combined into the vdbe.c source file.
** But that file was getting too big so this subroutines were split out.
**
** $Id: vdbeaux.c,v 1.408 2008/08/20 16:35:10 drh Exp $
** $Id: vdbeaux.c,v 1.409 2008/08/20 22:06:48 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@ -2198,7 +2198,7 @@ UnpackedRecord *sqlite3VdbeRecordUnpack(
KeyInfo *pKeyInfo, /* Information about the record format */
int nKey, /* Size of the binary record */
const void *pKey, /* The binary record */
void *pSpace, /* Space available to hold resulting object */
UnpackedRecord *pSpace,/* Space available to hold resulting object */
int szSpace /* Size of pSpace[] in bytes */
){
const unsigned char *aKey = (const unsigned char *)pKey;