SQLite

Check-in [73b430de0c]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Improvements to the formatting and layout of the code in the previous checkin. (CVS 2636)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 73b430de0c0f3cd230861fc1a53691818f17de0d
User & Date: drh 2005-08-28 01:38:44.000
Context
2005-08-28
17:00
The LIKE optimization does the right thing when collating sequences are present. LIKE expressions where the left-hand side has COLLATE NOCASE are optimized in the default case. (CVS 2637) (check-in: ef84ff795c user: drh tags: trunk)
01:38
Improvements to the formatting and layout of the code in the previous checkin. (CVS 2636) (check-in: 73b430de0c user: drh tags: trunk)
01:34
Add an assert to verify that floating point values and integers use the same byte order. Add a comment to the SELECT code generator. (CVS 2635) (check-in: 07b4892149 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/vdbeaux.c.
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721

1722
1723
1724



1725
1726
1727
1728
1729
1730
1731
      x = (x<<32) | y;
      pMem->i = *(i64*)&x;
      pMem->flags = MEM_Int;
      return 6;
    }
    case 6:   /* 8-byte signed integer */
    case 7: { /* IEEE floating point */
      u64 x = (buf[0]<<24) | (buf[1]<<16) | (buf[2]<<8) | buf[3];
      u32 y = (buf[4]<<24) | (buf[5]<<16) | (buf[6]<<8) | buf[7];
#ifndef NDEBUG
      /* Verify that integers and floating point values use the same
      ** byte order.  The byte order differs on some (broken) architectures. */

      static const u64 t1 = ((u64)0x3ff00000)<<32;
      assert( 1.0==*(double*)&t1 );
#endif



      x = (x<<32) | y;
      if( serial_type==6 ){
        pMem->i = *(i64*)&x;
        pMem->flags = MEM_Int;
      }else{
        pMem->r = *(double*)&x;
        pMem->flags = MEM_Real;







<
<


|
>



>
>
>







1710
1711
1712
1713
1714
1715
1716


1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
      x = (x<<32) | y;
      pMem->i = *(i64*)&x;
      pMem->flags = MEM_Int;
      return 6;
    }
    case 6:   /* 8-byte signed integer */
    case 7: { /* IEEE floating point */


#ifndef NDEBUG
      /* Verify that integers and floating point values use the same
      ** byte order.  The byte order differs on some (broken) architectures.
      */
      static const u64 t1 = ((u64)0x3ff00000)<<32;
      assert( 1.0==*(double*)&t1 );
#endif

      u64 x = (buf[0]<<24) | (buf[1]<<16) | (buf[2]<<8) | buf[3];
      u32 y = (buf[4]<<24) | (buf[5]<<16) | (buf[6]<<8) | buf[7];
      x = (x<<32) | y;
      if( serial_type==6 ){
        pMem->i = *(i64*)&x;
        pMem->flags = MEM_Int;
      }else{
        pMem->r = *(double*)&x;
        pMem->flags = MEM_Real;