Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Avoid unnecessary strlen() calls in the OP_String opcode. (CVS 2768) |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
2e195e96bcbad104da09ebe6cef617e0 |
User & Date: | drh 2005-11-16 04:34:32.000 |
Context
2005-11-16
| ||
12:53 | Do not allow aggregate functions in a WHERE clause. Ticket #1514. (CVS 2769) (check-in: bb866ed880 user: drh tags: trunk) | |
04:34 | Avoid unnecessary strlen() calls in the OP_String opcode. (CVS 2768) (check-in: 2e195e96bc user: drh tags: trunk) | |
2005-11-15
| ||
02:14 | Fix a bug in UTF-16 handling introduced by the previous check-in. (CVS 2767) (check-in: 25fa16a2e1 user: drh tags: trunk) | |
Changes
Changes to src/vdbe.c.
︙ | ︙ | |||
39 40 41 42 43 44 45 | ** ** Various scripts scan this source file in order to generate HTML ** documentation, headers files, or other derived files. The formatting ** of the code in this file is, therefore, important. See other comments ** in this file for details. If in doubt, do not deviate from existing ** commenting and indentation practices when changing or adding code. ** | | | 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | ** ** Various scripts scan this source file in order to generate HTML ** documentation, headers files, or other derived files. The formatting ** of the code in this file is, therefore, important. See other comments ** 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.498 2005/11/16 04:34:32 drh Exp $ */ #include "sqliteInt.h" #include "os.h" #include <ctype.h> #include "vdbeInt.h" /* |
︙ | ︙ | |||
634 635 636 637 638 639 640 | pTos->flags |= MEM_Real; sqlite3VdbeChangeEncoding(pTos, db->enc); break; } /* Opcode: String8 * * P3 ** | | > | > < > > | | < < < < | < < < < < < < | 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 | pTos->flags |= MEM_Real; sqlite3VdbeChangeEncoding(pTos, db->enc); break; } /* Opcode: String8 * * P3 ** ** P3 points to a nul terminated UTF-8 string that is P1 character long ** (not counting the nul terminator). This opcode is transformed ** into an OP_String before it is executed for the first time. */ case OP_String8: { /* same as TK_STRING */ assert( pOp->p3!=0 ); pOp->opcode = OP_String; pOp->p1 = strlen(pOp->p3); #ifndef SQLITE_OMIT_UTF16 if( db->enc!=SQLITE_UTF8 ){ pTos++; sqlite3VdbeMemSetStr(pTos, pOp->p3, -1, SQLITE_UTF8, SQLITE_STATIC); if( SQLITE_OK!=sqlite3VdbeChangeEncoding(pTos, db->enc) ) goto no_mem; if( SQLITE_OK!=sqlite3VdbeMemDynamicify(pTos) ) goto no_mem; pTos->flags &= ~(MEM_Dyn); pTos->flags |= MEM_Static; if( pOp->p3type==P3_DYNAMIC ){ sqliteFree(pOp->p3); } pOp->p3type = P3_DYNAMIC; pOp->p3 = pTos->z; pOp->p1 *= 2; break; } #endif /* Otherwise fall through to the next case, OP_String */ } /* Opcode: String P1 * P3 ** ** The string value P3 of length P1 is pushed onto the stack. */ case OP_String: { pTos++; assert( pOp->p3!=0 ); pTos->flags = MEM_Str|MEM_Static|MEM_Term; pTos->z = pOp->p3; pTos->n = pOp->p1; pTos->enc = db->enc; break; } /* Opcode: Null * * * ** ** Push a NULL onto the stack. |
︙ | ︙ |