SQLite

Check-in [93e28ea1ef]
Login

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

Overview
Comment:Do not use sorters for INSERT statements that insert multiple rows using the VALUES clause.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | insert-select-opt
Files: files | file ages | folders
SHA1: 93e28ea1ef41f274c5685f3bbb93a4d9ad44c880
User & Date: dan 2015-03-21 15:26:42.797
Context
2015-03-23
14:39
Set the OPFLAG_SEEKRESULT correctly in "INSERT INTO ... SELECT" statements. (check-in: 6f7d999585 user: dan tags: insert-select-opt)
2015-03-21
15:26
Do not use sorters for INSERT statements that insert multiple rows using the VALUES clause. (check-in: 93e28ea1ef user: dan tags: insert-select-opt)
15:04
Merge latest trunk changes with this branch. (check-in: 9affe7f3f9 user: dan tags: insert-select-opt)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/insert.c.
782
783
784
785
786
787
788

789
790
791
792
793
794
795
    **
    **    * there are no triggers to fire, and
    **    * no foreign key processing to perform, and
    **    * the on-conflict mode used for all UNIQUE and PRIMARY KEY indexes, 
    **      including INTEGER PRIMARY KEYs, is either ROLLBACK or ABORT.
    */
    if( pSelect 

     && onError!=OE_Fail && onError!=OE_Replace && onError!=OE_Ignore
     && !IsVirtual(pTab) 
     && pTrigger==0 
     && 0==sqlite3FkRequired(pParse, pTab, 0, 0) 
    ){
      for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
        u8 oe = idxConflictMode(pIdx, onError);







>







782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
    **
    **    * there are no triggers to fire, and
    **    * no foreign key processing to perform, and
    **    * the on-conflict mode used for all UNIQUE and PRIMARY KEY indexes, 
    **      including INTEGER PRIMARY KEYs, is either ROLLBACK or ABORT.
    */
    if( pSelect 
     && 0==(pSelect->selFlags & SF_Values)
     && onError!=OE_Fail && onError!=OE_Replace && onError!=OE_Ignore
     && !IsVirtual(pTab) 
     && pTrigger==0 
     && 0==sqlite3FkRequired(pParse, pTab, 0, 0) 
    ){
      for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
        u8 oe = idxConflictMode(pIdx, onError);