]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Modify the sqlite3VdbeUnpackRecord() interface to force the temporary
authordrh <drh@noemail.net>
Wed, 20 Aug 2008 22:06:47 +0000 (22:06 +0000)
committerdrh <drh@noemail.net>
Wed, 20 Aug 2008 22:06:47 +0000 (22:06 +0000)
space to be 8-byte aligned.  This might be important for Sparc.
Ticket #3318. (CVS 5573)

FossilOrigin-Name: 00b177985ee08f13a7781d095936da3beaf0408c

manifest
manifest.uuid
src/btree.c
src/vdbe.c
src/vdbe.h
src/vdbeaux.c

index 5a8dd30e4bf904fad12e66e9d5c2334a16048c28..6e67fb2db46ce6a87ce3b12479628ca663067d81 100644 (file)
--- a/manifest
+++ b/manifest
@@ -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
index 3ed67b067a9301db71ca15a2d80e6b3c993a8be1..bef40c7fb49ddaed7743203b852833df13ba70a4 100644 (file)
@@ -1 +1 @@
-4b0e67d397236c740bea88ad3a5912abe896322a
\ No newline at end of file
+00b177985ee08f13a7781d095936da3beaf0408c
\ No newline at end of file
index a641188707efe94f2b31d7f88bf735c66a9fb6a4..8b3d0e19bf14be4992f6bd31bed258aa7d9b114b 100644 (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;
index f2e39dd2d6cb24f1716705e3bb3a7706f01122ff..9300757e5713086cc0f7ac706c8f080469002a8e 100644 (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;
     }
index f82c8b163b7965af7b3fb1ec0a97af8944eaad9c..8889f24af8972e575db230be56a176647360e961 100644 (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*);
 
index d1bd0e8cf128b91315bd540a9cb36062c97bdc88..2bf27816caa45a24ca0b438b495b0401c1530ad4 100644 (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;