mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
:-) (CVS 66)
FossilOrigin-Name: 5d2e72e4bd5e218133190b8b1ebe52f48e2d7140
This commit is contained in:
27
src/vdbe.c
27
src/vdbe.c
@@ -41,7 +41,7 @@
|
||||
** But other routines are also provided to help in building up
|
||||
** a program instruction by instruction.
|
||||
**
|
||||
** $Id: vdbe.c,v 1.25 2000/06/07 00:12:25 drh Exp $
|
||||
** $Id: vdbe.c,v 1.26 2000/06/07 01:27:49 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include <unistd.h>
|
||||
@@ -2617,12 +2617,25 @@ int sqliteVdbeExec(
|
||||
c = zDelim[0];
|
||||
nDelim = strlen(zDelim);
|
||||
p->azField[0] = z;
|
||||
for(i=1; *z!=0 && i<nField; i++){
|
||||
while( *z && (*z!=c || strncmp(z,zDelim,nDelim)) ){ z++; }
|
||||
if( *z ){
|
||||
*z = 0;
|
||||
z += nDelim;
|
||||
p->azField[i] = z;
|
||||
for(i=1; *z!=0 && i<=nField; i++){
|
||||
int from, to;
|
||||
from = to = 0;
|
||||
while( z[from] ){
|
||||
if( z[from]=='\\' && z[from+1]!=0 ){
|
||||
z[to++] = z[from+1];
|
||||
from += 2;
|
||||
continue;
|
||||
}
|
||||
if( z[from]==c && strncmp(&z[from],zDelim,nDelim)==0 ) break;
|
||||
z[to++] = z[from++];
|
||||
}
|
||||
if( z[from] ){
|
||||
z[to] = 0;
|
||||
z += from + nDelim;
|
||||
if( i<nField ) p->azField[i] = z;
|
||||
}else{
|
||||
z[to] = 0;
|
||||
z = "";
|
||||
}
|
||||
}
|
||||
while( i<nField ){
|
||||
|
Reference in New Issue
Block a user