|  line  | 
 true  | 
 false  | 
 branch  | 
 
| 
10
 | 
 101  | 
 0  | 
 DBISTATE_DECLARE;  | 
 
| 
 | 
 0  | 
 101  | 
 DBISTATE_DECLARE;  | 
 
| 
55
 | 
 0  | 
 1898  | 
     ((sql[0] == 'B' || sql[0] == 'b') &&  | 
 
| 
 | 
 0  | 
 23  | 
     ((sql[0] == 'B' || sql[0] == 'b') &&  | 
 
| 
56
 | 
 0  | 
 0  | 
      (sql[1] == 'E' || sql[1] == 'e') &&  | 
 
| 
 | 
 0  | 
 23  | 
      (sql[1] == 'E' || sql[1] == 'e') &&  | 
 
| 
57
 | 
 0  | 
 0  | 
      (sql[2] == 'G' || sql[2] == 'g') &&  | 
 
| 
 | 
 0  | 
 23  | 
      (sql[2] == 'G' || sql[2] == 'g') &&  | 
 
| 
58
 | 
 0  | 
 0  | 
      (sql[3] == 'I' || sql[3] == 'i') &&  | 
 
| 
 | 
 0  | 
 23  | 
      (sql[3] == 'I' || sql[3] == 'i') &&  | 
 
| 
59
 | 
 0  | 
 0  | 
      (sql[4] == 'N' || sql[4] == 'n')  | 
 
| 
61
 | 
 78  | 
 1140  | 
      (sql[0] == 'S' || sql[0] == 's') &&  | 
 
| 
 | 
 745  | 
 13  | 
      (sql[0] == 'S' || sql[0] == 's') &&  | 
 
| 
62
 | 
 0  | 
 745  | 
      (sql[1] == 'A' || sql[1] == 'a') &&  | 
 
| 
 | 
 0  | 
 13  | 
      (sql[1] == 'A' || sql[1] == 'a') &&  | 
 
| 
63
 | 
 0  | 
 0  | 
      (sql[2] == 'V' || sql[2] == 'v') &&  | 
 
| 
 | 
 0  | 
 13  | 
      (sql[2] == 'V' || sql[2] == 'v') &&  | 
 
| 
64
 | 
 0  | 
 0  | 
      (sql[3] == 'E' || sql[3] == 'e') &&  | 
 
| 
 | 
 0  | 
 13  | 
      (sql[3] == 'E' || sql[3] == 'e') &&  | 
 
| 
65
 | 
 0  | 
 0  | 
      (sql[4] == 'P' || sql[4] == 'p') &&  | 
 
| 
 | 
 0  | 
 13  | 
      (sql[4] == 'P' || sql[4] == 'p') &&  | 
 
| 
66
 | 
 0  | 
 0  | 
      (sql[5] == 'O' || sql[5] == 'o') &&  | 
 
| 
 | 
 0  | 
 13  | 
      (sql[5] == 'O' || sql[5] == 'o') &&  | 
 
| 
67
 | 
 0  | 
 0  | 
      (sql[6] == 'I' || sql[6] == 'i') &&  | 
 
| 
 | 
 0  | 
 13  | 
      (sql[6] == 'I' || sql[6] == 'i') &&  | 
 
| 
68
 | 
 0  | 
 0  | 
      (sql[7] == 'N' || sql[7] == 'n') &&  | 
 
| 
 | 
 0  | 
 13  | 
      (sql[7] == 'N' || sql[7] == 'n') &&  | 
 
| 
69
 | 
 0  | 
 0  | 
      (sql[8] == 'T' || sql[8] == 't')  | 
 
| 
71
 | 
 1898  | 
 23  | 
   ) ? TRUE : FALSE;  | 
 
| 
 | 
 1218  | 
 680  | 
   ) ? TRUE : FALSE;  | 
 
| 
84
 | 
 1032  | 
 120  | 
   for(i = 0; c == 0 && i < 18; i++){  | 
 
| 
 | 
 984  | 
 48  | 
   for(i = 0; c == 0 && i < 18; i++){  | 
 
| 
87
 | 
 48  | 
 120  | 
   if(c == 0){  | 
 
| 
100
 | 
 633  | 
 218  | 
   while(zNum < zEnd && _isspace(*zNum)) zNum++;  | 
 
| 
 | 
 1  | 
 632  | 
   while(zNum < zEnd && _isspace(*zNum)) zNum++;  | 
 
| 
 | 
 0  | 
 632  | 
   while(zNum < zEnd && _isspace(*zNum)) zNum++;  | 
 
| 
 | 
 0  | 
 632  | 
   while(zNum < zEnd && _isspace(*zNum)) zNum++;  | 
 
| 
 | 
 0  | 
 632  | 
   while(zNum < zEnd && _isspace(*zNum)) zNum++;  | 
 
| 
 | 
 0  | 
 632  | 
   while(zNum < zEnd && _isspace(*zNum)) zNum++;  | 
 
| 
 | 
 0  | 
 632  | 
   while(zNum < zEnd && _isspace(*zNum)) zNum++;  | 
 
| 
101
 | 
 632  | 
 218  | 
   if (zNum < zEnd) {  | 
 
| 
102
 | 
 188  | 
 444  | 
     if (*zNum == '-') {  | 
 
| 
105
 | 
 0  | 
 444  | 
     } else if (*zNum == '+') {  | 
 
| 
110
 | 
 632  | 
 262  | 
   while(zNum < zEnd && zNum[0] == '0') zNum++;  | 
 
| 
 | 
 44  | 
 588  | 
   while(zNum < zEnd && zNum[0] == '0') zNum++;  | 
 
| 
111
 | 
 5190  | 
 836  | 
   for(i = 0; &zNum[i] < zEnd && (c = zNum[i]) >= '0' && c <= '9'; i++) {  | 
 
| 
 | 
 5184  | 
 6  | 
   for(i = 0; &zNum[i] < zEnd && (c = zNum[i]) >= '0' && c <= '9'; i++) {  | 
 
| 
 | 
 5176  | 
 8  | 
   for(i = 0; &zNum[i] < zEnd && (c = zNum[i]) >= '0' && c <= '9'; i++) {  | 
 
| 
114
 | 
 12  | 
 838  | 
   if (u > LARGEST_INT64) {  | 
 
| 
115
 | 
 12  | 
 0  | 
     *pNum = neg ? SMALLEST_INT64 : LARGEST_INT64;  | 
 
| 
116
 | 
 176  | 
 662  | 
   } else if (neg) {  | 
 
| 
121
 | 
 588  | 
 262  | 
   if ((c != 0 && &zNum[i] < zEnd) || (i == 0 && zStart == zNum) || i > 19) {  | 
 
| 
 | 
 574  | 
 14  | 
   if ((c != 0 && &zNum[i] < zEnd) || (i == 0 && zStart == zNum) || i > 19) {  | 
 
| 
 | 
 262  | 
 574  | 
   if ((c != 0 && &zNum[i] < zEnd) || (i == 0 && zStart == zNum) || i > 19) {  | 
 
| 
 | 
 44  | 
 218  | 
   if ((c != 0 && &zNum[i] < zEnd) || (i == 0 && zStart == zNum) || i > 19) {  | 
 
| 
 | 
 0  | 
 618  | 
   if ((c != 0 && &zNum[i] < zEnd) || (i == 0 && zStart == zNum) || i > 19) {  | 
 
| 
123
 | 
 450  | 
 168  | 
   } else if (i < 19) {  | 
 
| 
127
 | 
 156  | 
 12  | 
     if (c < 0) {  | 
 
| 
129
 | 
 0  | 
 12  | 
     } else if (c > 0) {  | 
 
| 
132
 | 
 12  | 
 0  | 
       return neg ? 0 : 2;  | 
 
| 
153
 | 
 0  | 
 183  | 
     if ( DBIc_TRACE_LEVEL(imp_xxh) >= 3 ) {  | 
 
| 
169
 | 
 39  | 
 2892  | 
     if ( rc != SQLITE_OK ) {  | 
 
| 
171
 | 
 39  | 
 0  | 
         if (errmsg) sqlite3_free(errmsg);  | 
 
| 
180
 | 
 20  | 
 238  | 
     if (flags) {  | 
 
| 
185
 | 
 6  | 
 252  | 
     if ( rc != SQLITE_OK ) {  | 
 
| 
187
 | 
 0  | 
 6  | 
         if (extended)  | 
 
| 
191
 | 
 6  | 
 0  | 
         if (*db) sqlite3_close(*db);  | 
 
| 
267
 | 
 336  | 
 382  | 
         if (is_unicode) {  | 
 
| 
291
 | 
 6  | 
 568  | 
     if ( is_error ) {  | 
 
| 
292
 | 
 6  | 
 0  | 
         s = SvPV(result, len);  | 
 
| 
298
 | 
 146  | 
 422  | 
     if ( !SvOK(result) ) {  | 
 
| 
 | 
 146  | 
 0  | 
     if ( !SvOK(result) ) {  | 
 
| 
 | 
 146  | 
 0  | 
     if ( !SvOK(result) ) {  | 
 
| 
300
 | 
 0  | 
 422  | 
     } else if( SvIOK_UV(result) ) {  | 
 
| 
302
 | 
 0  | 
 0  | 
             sqlite3_result_int64( context, (sqlite3_int64)SvUV(result));  | 
 
| 
307
 | 
 278  | 
 144  | 
     } else if ( !_sqlite_atoi64(SvPV(result, len), &iv) ) {  | 
 
| 
 | 
 190  | 
 232  | 
     } else if ( !_sqlite_atoi64(SvPV(result, len), &iv) ) {  | 
 
| 
309
 | 
 218  | 
 14  | 
     } else if ( SvNOK(result) && ( sizeof(NV) == sizeof(double) || SvNVX(result) == (double) SvNVX(result) ) ) {  | 
 
| 
310
 | 
 218  | 
 0  | 
         sqlite3_result_double( context, SvNV(result));  | 
 
| 
312
 | 
 14  | 
 0  | 
         s = SvPV(result, len);  | 
 
| 
334
 | 
 207  | 
 17  | 
     if (sql_type != SQLITE_NULL) {  | 
 
| 
335
 | 
 1  | 
 207  | 
         while (*z == ' ') { z++; v++; d++; }  | 
 
| 
338
 | 
 94  | 
 130  | 
     if      (*z == '-') { neg = 1; z++; d++; }  | 
 
| 
339
 | 
 0  | 
 130  | 
     else if (*z == '+') { neg = 0; z++; d++; has_plus = TRUE; }  | 
 
| 
341
 | 
 2  | 
 222  | 
     if (!isdigit(*z)) return 0;  | 
 
| 
342
 | 
 2450  | 
 222  | 
     while (isdigit(*z)) { digit++; z++; }  | 
 
| 
343
 | 
 0  | 
 222  | 
     if (digit > 19) maybe_int = FALSE; /* too large for i64 */  | 
 
| 
344
 | 
 84  | 
 138  | 
     if (digit == 19) {  | 
 
| 
349
 | 
 24  | 
 60  | 
         if (c == 0) {  | 
 
| 
352
 | 
 0  | 
 84  | 
         if (c > 0) maybe_int = FALSE;  | 
 
| 
354
 | 
 6  | 
 216  | 
     if (*z == '.') {  | 
 
| 
357
 | 
 0  | 
 6  | 
         if (!isdigit(*z)) return 0;  | 
 
| 
358
 | 
 10  | 
 6  | 
         while (isdigit(*z)) { precision++; z++; }  | 
 
| 
360
 | 
 218  | 
 4  | 
     if (*z == 'e' || *z == 'E') {  | 
 
| 
 | 
 0  | 
 218  | 
     if (*z == 'e' || *z == 'E') {  | 
 
| 
363
 | 
 4  | 
 0  | 
         if (*z == '+' || *z == '-') { z++; }  | 
 
| 
 | 
 0  | 
 4  | 
         if (*z == '+' || *z == '-') { z++; }  | 
 
| 
364
 | 
 0  | 
 4  | 
         if (!isdigit(*z)) return 0;  | 
 
| 
365
 | 
 12  | 
 4  | 
         while (isdigit(*z)) { z++; }  | 
 
| 
367
 | 
 0  | 
 222  | 
     if (*z && !isdigit(*z)) return 0;  | 
 
| 
 | 
 0  | 
 0  | 
     if (*z && !isdigit(*z)) return 0;  | 
 
| 
369
 | 
 214  | 
 8  | 
     if (maybe_int && digit) {  | 
 
| 
 | 
 214  | 
 0  | 
     if (maybe_int && digit) {  | 
 
| 
370
 | 
 214  | 
 0  | 
         if (!_sqlite_atoi64(v, &iv)) return 1;  | 
 
| 
372
 | 
 6  | 
 2  | 
     if (sql_type != SQLITE_INTEGER) {  | 
 
| 
373
 | 
 0  | 
 6  | 
         sprintf(format, (has_plus ? "+%%.%df" : "%%.%df"), precision);  | 
 
| 
374
 | 
 2  | 
 4  | 
         if (strEQ(form(format, atof(v)), v)) return 2;  | 
 
| 
387
 | 
 0  | 
 101  | 
     DBISTATE_INIT; /* Initialize the DBI macros  */  | 
 
| 
408
 | 
 0  | 
 254  | 
     sqlite_trace(dbh, imp_dbh, 3, form("login '%s' (version %s)", dbname, sqlite3_version));  | 
 
| 
410
 | 
 254  | 
 0  | 
     if (SvROK(attr)) {  | 
 
| 
412
 | 
 0  | 
 254  | 
         if (hv_exists(hv, "sqlite_extended_result_codes", 28)) {  | 
 
| 
414
 | 
 0  | 
 0  | 
             extended = (val && SvOK(*val)) ? !(!SvTRUE(*val)) : 0;  | 
 
| 
 | 
 0  | 
 0  | 
             extended = (val && SvOK(*val)) ? !(!SvTRUE(*val)) : 0;  | 
 
| 
 | 
 0  | 
 0  | 
             extended = (val && SvOK(*val)) ? !(!SvTRUE(*val)) : 0;  | 
 
| 
 | 
 0  | 
 0  | 
             extended = (val && SvOK(*val)) ? !(!SvTRUE(*val)) : 0;  | 
 
| 
 | 
 0  | 
 0  | 
             extended = (val && SvOK(*val)) ? !(!SvTRUE(*val)) : 0;  | 
 
| 
 | 
 0  | 
 0  | 
             extended = (val && SvOK(*val)) ? !(!SvTRUE(*val)) : 0;  | 
 
| 
 | 
 0  | 
 0  | 
             extended = (val && SvOK(*val)) ? !(!SvTRUE(*val)) : 0;  | 
 
| 
 | 
 0  | 
 0  | 
             extended = (val && SvOK(*val)) ? !(!SvTRUE(*val)) : 0;  | 
 
| 
 | 
 0  | 
 0  | 
             extended = (val && SvOK(*val)) ? !(!SvTRUE(*val)) : 0;  | 
 
| 
 | 
 0  | 
 0  | 
             extended = (val && SvOK(*val)) ? !(!SvTRUE(*val)) : 0;  | 
 
| 
 | 
 0  | 
 0  | 
             extended = (val && SvOK(*val)) ? !(!SvTRUE(*val)) : 0;  | 
 
| 
 | 
 0  | 
 0  | 
             extended = (val && SvOK(*val)) ? !(!SvTRUE(*val)) : 0;  | 
 
| 
 | 
 0  | 
 0  | 
             extended = (val && SvOK(*val)) ? !(!SvTRUE(*val)) : 0;  | 
 
| 
 | 
 0  | 
 0  | 
             extended = (val && SvOK(*val)) ? !(!SvTRUE(*val)) : 0;  | 
 
| 
 | 
 0  | 
 0  | 
             extended = (val && SvOK(*val)) ? !(!SvTRUE(*val)) : 0;  | 
 
| 
 | 
 0  | 
 0  | 
             extended = (val && SvOK(*val)) ? !(!SvTRUE(*val)) : 0;  | 
 
| 
 | 
 0  | 
 0  | 
             extended = (val && SvOK(*val)) ? !(!SvTRUE(*val)) : 0;  | 
 
| 
 | 
 0  | 
 0  | 
             extended = (val && SvOK(*val)) ? !(!SvTRUE(*val)) : 0;  | 
 
| 
 | 
 0  | 
 0  | 
             extended = (val && SvOK(*val)) ? !(!SvTRUE(*val)) : 0;  | 
 
| 
 | 
 0  | 
 0  | 
             extended = (val && SvOK(*val)) ? !(!SvTRUE(*val)) : 0;  | 
 
| 
 | 
 0  | 
 0  | 
             extended = (val && SvOK(*val)) ? !(!SvTRUE(*val)) : 0;  | 
 
| 
 | 
 0  | 
 0  | 
             extended = (val && SvOK(*val)) ? !(!SvTRUE(*val)) : 0;  | 
 
| 
 | 
 0  | 
 0  | 
             extended = (val && SvOK(*val)) ? !(!SvTRUE(*val)) : 0;  | 
 
| 
416
 | 
 1  | 
 253  | 
         if (hv_exists(hv, "ReadOnly", 8)) {  | 
 
| 
418
 | 
 1  | 
 0  | 
             if ((val && SvOK(*val)) ? SvIV(*val) : 0) {  | 
 
| 
 | 
 0  | 
 1  | 
             if ((val && SvOK(*val)) ? SvIV(*val) : 0) {  | 
 
| 
 | 
 0  | 
 0  | 
             if ((val && SvOK(*val)) ? SvIV(*val) : 0) {  | 
 
| 
 | 
 0  | 
 0  | 
             if ((val && SvOK(*val)) ? SvIV(*val) : 0) {  | 
 
| 
 | 
 1  | 
 0  | 
             if ((val && SvOK(*val)) ? SvIV(*val) : 0) {  | 
 
| 
 | 
 1  | 
 0  | 
             if ((val && SvOK(*val)) ? SvIV(*val) : 0) {  | 
 
| 
422
 | 
 19  | 
 235  | 
         if (hv_exists(hv, "sqlite_open_flags", 17)) {  | 
 
| 
424
 | 
 19  | 
 0  | 
             flag |= (val && SvOK(*val)) ? SvIV(*val) : 0;  | 
 
| 
 | 
 0  | 
 19  | 
             flag |= (val && SvOK(*val)) ? SvIV(*val) : 0;  | 
 
| 
 | 
 0  | 
 0  | 
             flag |= (val && SvOK(*val)) ? SvIV(*val) : 0;  | 
 
| 
 | 
 0  | 
 0  | 
             flag |= (val && SvOK(*val)) ? SvIV(*val) : 0;  | 
 
| 
 | 
 19  | 
 0  | 
             flag |= (val && SvOK(*val)) ? SvIV(*val) : 0;  | 
 
| 
425
 | 
 3  | 
 16  | 
             if (flag & SQLITE_OPEN_READONLY) {  | 
 
| 
430
 | 
 34  | 
 220  | 
         if (hv_exists(hv, "sqlite_unicode", 14)) {  | 
 
| 
432
 | 
 34  | 
 0  | 
             unicode = (val && SvOK(*val)) ? SvIV(*val) : 0;  | 
 
| 
 | 
 0  | 
 34  | 
             unicode = (val && SvOK(*val)) ? SvIV(*val) : 0;  | 
 
| 
 | 
 0  | 
 0  | 
             unicode = (val && SvOK(*val)) ? SvIV(*val) : 0;  | 
 
| 
 | 
 0  | 
 0  | 
             unicode = (val && SvOK(*val)) ? SvIV(*val) : 0;  | 
 
| 
 | 
 32  | 
 2  | 
             unicode = (val && SvOK(*val)) ? SvIV(*val) : 0;  | 
 
| 
433
 | 
 0  | 
 220  | 
         } else if (hv_exists(hv, "unicode", 7)) {  | 
 
| 
435
 | 
 0  | 
 0  | 
             unicode = (val && SvOK(*val)) ? SvIV(*val) : 0;  | 
 
| 
 | 
 0  | 
 0  | 
             unicode = (val && SvOK(*val)) ? SvIV(*val) : 0;  | 
 
| 
 | 
 0  | 
 0  | 
             unicode = (val && SvOK(*val)) ? SvIV(*val) : 0;  | 
 
| 
 | 
 0  | 
 0  | 
             unicode = (val && SvOK(*val)) ? SvIV(*val) : 0;  | 
 
| 
 | 
 0  | 
 0  | 
             unicode = (val && SvOK(*val)) ? SvIV(*val) : 0;  | 
 
| 
439
 | 
 6  | 
 248  | 
     if ( rc != SQLITE_OK ) {  | 
 
| 
482
 | 
 248  | 
 0  | 
     DBIc_ACTIVE_on(imp_dbh);  | 
 
| 
 | 
 248  | 
 0  | 
     DBIc_ACTIVE_on(imp_dbh);  | 
 
| 
 | 
 248  | 
 0  | 
     DBIc_ACTIVE_on(imp_dbh);  | 
 
| 
 | 
 0  | 
 248  | 
     DBIc_ACTIVE_on(imp_dbh);  | 
 
| 
495
 | 
 0  | 
 2755  | 
     if (!DBIc_ACTIVE(imp_dbh)) {  | 
 
| 
501
 | 
 106  | 
 2649  | 
     if (imp_dbh->unicode) {  | 
 
| 
505
 | 
 2755  | 
 0  | 
     statement = SvPV_nolen(sv_statement);  | 
 
| 
507
 | 
 0  | 
 2755  | 
     sqlite_trace(dbh, imp_dbh, 3, form("do statement: %s", statement));  | 
 
| 
511
 | 
 517  | 
 2238  | 
     if (sqlite3_get_autocommit(imp_dbh->db)) {  | 
 
| 
513
 | 
 8  | 
 7  | 
         _skip_whitespaces(sql);  | 
 
| 
 | 
 8  | 
 0  | 
         _skip_whitespaces(sql);  | 
 
| 
 | 
 3  | 
 5  | 
         _skip_whitespaces(sql);  | 
 
| 
 | 
 3  | 
 0  | 
         _skip_whitespaces(sql);  | 
 
| 
 | 
 3  | 
 0  | 
         _skip_whitespaces(sql);  | 
 
| 
 | 
 0  | 
 3  | 
         _skip_whitespaces(sql);  | 
 
| 
 | 
 37  | 
 17  | 
         _skip_whitespaces(sql);  | 
 
| 
 | 
 0  | 
 17  | 
         _skip_whitespaces(sql);  | 
 
| 
 | 
 5  | 
 12  | 
         _skip_whitespaces(sql);  | 
 
| 
 | 
 0  | 
 12  | 
         _skip_whitespaces(sql);  | 
 
| 
 | 
 0  | 
 12  | 
         _skip_whitespaces(sql);  | 
 
| 
 | 
 0  | 
 12  | 
         _skip_whitespaces(sql);  | 
 
| 
 | 
 3  | 
 0  | 
         _skip_whitespaces(sql);  | 
 
| 
 | 
 57  | 
 1  | 
         _skip_whitespaces(sql);  | 
 
| 
 | 
 55  | 
 2  | 
         _skip_whitespaces(sql);  | 
 
| 
 | 
 7  | 
 525  | 
         _skip_whitespaces(sql);  | 
 
| 
 | 
 0  | 
 525  | 
         _skip_whitespaces(sql);  | 
 
| 
 | 
 5  | 
 520  | 
         _skip_whitespaces(sql);  | 
 
| 
 | 
 0  | 
 520  | 
         _skip_whitespaces(sql);  | 
 
| 
 | 
 0  | 
 520  | 
         _skip_whitespaces(sql);  | 
 
| 
 | 
 0  | 
 520  | 
         _skip_whitespaces(sql);  | 
 
| 
 | 
 3  | 
 517  | 
         _skip_whitespaces(sql);  | 
 
| 
 | 
 3  | 
 0  | 
         _skip_whitespaces(sql);  | 
 
| 
514
 | 
 30  | 
 487  | 
         if (_starts_with_begin(sql)) {  | 
 
| 
515
 | 
 15  | 
 15  | 
             if (DBIc_is(imp_dbh,  DBIcf_AutoCommit)) {  | 
 
| 
516
 | 
 15  | 
 0  | 
                 if (!DBIc_is(imp_dbh,  DBIcf_BegunWork)) {  | 
 
| 
523
 | 
 70  | 
 417  | 
         else if (!DBIc_is(imp_dbh, DBIcf_AutoCommit)) {  | 
 
| 
524
 | 
 0  | 
 70  | 
             sqlite_trace(dbh, imp_dbh, 3, "BEGIN TRAN");  | 
 
| 
525
 | 
 70  | 
 0  | 
             if (imp_dbh->use_immediate_transaction) {  | 
 
| 
530
 | 
 5  | 
 65  | 
             if (rc != SQLITE_OK) {  | 
 
| 
537
 | 
 28  | 
 2722  | 
     if (rc != SQLITE_OK) {  | 
 
| 
542
 | 
 2236  | 
 486  | 
     if (DBIc_is(imp_dbh, DBIcf_BegunWork) && sqlite3_get_autocommit(imp_dbh->db)) {  | 
 
| 
 | 
 17  | 
 2219  | 
     if (DBIc_is(imp_dbh, DBIcf_BegunWork) && sqlite3_get_autocommit(imp_dbh->db)) {  | 
 
| 
543
 | 
 16  | 
 1  | 
         if (imp_dbh->began_transaction) {  | 
 
| 
558
 | 
 2  | 
 74  | 
     if (!DBIc_ACTIVE(imp_dbh)) {  | 
 
| 
563
 | 
 1  | 
 73  | 
     if (DBIc_is(imp_dbh, DBIcf_AutoCommit)) {  | 
 
| 
568
 | 
 28  | 
 45  | 
     if (DBIc_is(imp_dbh, DBIcf_BegunWork)) {  | 
 
| 
578
 | 
 71  | 
 2  | 
     if (!sqlite3_get_autocommit(imp_dbh->db)) {  | 
 
| 
579
 | 
 0  | 
 71  | 
         sqlite_trace(dbh, imp_dbh, 3, "COMMIT TRAN");  | 
 
| 
582
 | 
 4  | 
 67  | 
         if (rc != SQLITE_OK) {  | 
 
| 
596
 | 
 2  | 
 50  | 
     if (!DBIc_ACTIVE(imp_dbh)) {  | 
 
| 
601
 | 
 7  | 
 43  | 
     if (DBIc_is(imp_dbh, DBIcf_BegunWork)) {  | 
 
| 
611
 | 
 18  | 
 32  | 
     if (!sqlite3_get_autocommit(imp_dbh->db)) {  | 
 
| 
613
 | 
 0  | 
 18  | 
         sqlite_trace(dbh, imp_dbh, 3, "ROLLBACK TRAN");  | 
 
| 
616
 | 
 0  | 
 18  | 
         if (rc != SQLITE_OK) {  | 
 
| 
631
 | 
 24  | 
 222  | 
     if (DBIc_is(imp_dbh, DBIcf_AutoCommit) == FALSE) {  | 
 
| 
634
 | 
 246  | 
 0  | 
     DBIc_ACTIVE_off(imp_dbh);  | 
 
| 
 | 
 246  | 
 0  | 
     DBIc_ACTIVE_off(imp_dbh);  | 
 
| 
 | 
 245  | 
 1  | 
     DBIc_ACTIVE_off(imp_dbh);  | 
 
| 
 | 
 245  | 
 0  | 
     DBIc_ACTIVE_off(imp_dbh);  | 
 
| 
 | 
 0  | 
 245  | 
     DBIc_ACTIVE_off(imp_dbh);  | 
 
| 
638
 | 
 0  | 
 246  | 
     sqlite_trace( dbh, imp_dbh, 1, "Closing DB" );  | 
 
| 
640
 | 
 0  | 
 246  | 
     sqlite_trace( dbh, imp_dbh, 1, form("rc = %d", rc) );  | 
 
| 
641
 | 
 10  | 
 236  | 
     if ( SQLITE_BUSY == rc ) { /* We have unfinalized statements */  | 
 
| 
643
 | 
 10  | 
 10  | 
         while ( (s = imp_dbh->stmt_list) ) {  | 
 
| 
644
 | 
 0  | 
 10  | 
             sqlite_trace( dbh, imp_dbh, 1, form("Finalizing statement (%p)", s->stmt) );  | 
 
| 
650
 | 
 0  | 
 10  | 
         sqlite_trace( dbh, imp_dbh, 1, "Trying to close DB again" );  | 
 
| 
653
 | 
 0  | 
 246  | 
     if ( SQLITE_OK != rc ) {  | 
 
| 
658
 | 
 4  | 
 246  | 
     while( (s = imp_dbh->stmt_list) ) {  | 
 
| 
683
 | 
 0  | 
 248  | 
     if (DBIc_ACTIVE(imp_dbh)) {  | 
 
| 
694
 | 
 1334  | 
 0  | 
     char *key = SvPV_nolen(keysv);  | 
 
| 
699
 | 
 323  | 
 1011  | 
     if (strEQ(key, "AutoCommit")) {  | 
 
| 
700
 | 
 323  | 
 0  | 
         if (SvTRUE(valuesv)) {  | 
 
| 
 | 
 0  | 
 323  | 
         if (SvTRUE(valuesv)) {  | 
 
| 
 | 
 2  | 
 321  | 
         if (SvTRUE(valuesv)) {  | 
 
| 
 | 
 2  | 
 0  | 
         if (SvTRUE(valuesv)) {  | 
 
| 
 | 
 0  | 
 2  | 
         if (SvTRUE(valuesv)) {  | 
 
| 
 | 
 4  | 
 317  | 
         if (SvTRUE(valuesv)) {  | 
 
| 
 | 
 4  | 
 0  | 
         if (SvTRUE(valuesv)) {  | 
 
| 
 | 
 4  | 
 0  | 
         if (SvTRUE(valuesv)) {  | 
 
| 
 | 
 1  | 
 3  | 
         if (SvTRUE(valuesv)) {  | 
 
| 
 | 
 1  | 
 0  | 
         if (SvTRUE(valuesv)) {  | 
 
| 
 | 
 317  | 
 0  | 
         if (SvTRUE(valuesv)) {  | 
 
| 
 | 
 317  | 
 0  | 
         if (SvTRUE(valuesv)) {  | 
 
| 
 | 
 75  | 
 242  | 
         if (SvTRUE(valuesv)) {  | 
 
| 
 | 
 0  | 
 75  | 
         if (SvTRUE(valuesv)) {  | 
 
| 
 | 
 0  | 
 0  | 
         if (SvTRUE(valuesv)) {  | 
 
| 
 | 
 243  | 
 80  | 
         if (SvTRUE(valuesv)) {  | 
 
| 
702
 | 
 242  | 
 1  | 
             if ( DBIc_ACTIVE(imp_dbh) && (!DBIc_is(imp_dbh, DBIcf_AutoCommit)) && (!sqlite3_get_autocommit(imp_dbh->db)) ) {  | 
 
| 
 | 
 237  | 
 5  | 
             if ( DBIc_ACTIVE(imp_dbh) && (!DBIc_is(imp_dbh, DBIcf_AutoCommit)) && (!sqlite3_get_autocommit(imp_dbh->db)) ) {  | 
 
| 
 | 
 2  | 
 235  | 
             if ( DBIc_ACTIVE(imp_dbh) && (!DBIc_is(imp_dbh, DBIcf_AutoCommit)) && (!sqlite3_get_autocommit(imp_dbh->db)) ) {  | 
 
| 
703
 | 
 0  | 
 2  | 
                 sqlite_trace(dbh, imp_dbh, 3, "COMMIT TRAN");  | 
 
| 
705
 | 
 0  | 
 2  | 
                 if (rc != SQLITE_OK) {  | 
 
| 
710
 | 
 323  | 
 0  | 
         DBIc_set(imp_dbh, DBIcf_AutoCommit, SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 323  | 
         DBIc_set(imp_dbh, DBIcf_AutoCommit, SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         DBIc_set(imp_dbh, DBIcf_AutoCommit, SvTRUE(valuesv));  | 
 
| 
 | 
 2  | 
 321  | 
         DBIc_set(imp_dbh, DBIcf_AutoCommit, SvTRUE(valuesv));  | 
 
| 
 | 
 2  | 
 0  | 
         DBIc_set(imp_dbh, DBIcf_AutoCommit, SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 2  | 
         DBIc_set(imp_dbh, DBIcf_AutoCommit, SvTRUE(valuesv));  | 
 
| 
 | 
 4  | 
 317  | 
         DBIc_set(imp_dbh, DBIcf_AutoCommit, SvTRUE(valuesv));  | 
 
| 
 | 
 4  | 
 0  | 
         DBIc_set(imp_dbh, DBIcf_AutoCommit, SvTRUE(valuesv));  | 
 
| 
 | 
 4  | 
 0  | 
         DBIc_set(imp_dbh, DBIcf_AutoCommit, SvTRUE(valuesv));  | 
 
| 
 | 
 1  | 
 3  | 
         DBIc_set(imp_dbh, DBIcf_AutoCommit, SvTRUE(valuesv));  | 
 
| 
 | 
 1  | 
 0  | 
         DBIc_set(imp_dbh, DBIcf_AutoCommit, SvTRUE(valuesv));  | 
 
| 
 | 
 1  | 
 3  | 
         DBIc_set(imp_dbh, DBIcf_AutoCommit, SvTRUE(valuesv));  | 
 
| 
 | 
 317  | 
 0  | 
         DBIc_set(imp_dbh, DBIcf_AutoCommit, SvTRUE(valuesv));  | 
 
| 
 | 
 317  | 
 0  | 
         DBIc_set(imp_dbh, DBIcf_AutoCommit, SvTRUE(valuesv));  | 
 
| 
 | 
 75  | 
 242  | 
         DBIc_set(imp_dbh, DBIcf_AutoCommit, SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 75  | 
         DBIc_set(imp_dbh, DBIcf_AutoCommit, SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         DBIc_set(imp_dbh, DBIcf_AutoCommit, SvTRUE(valuesv));  | 
 
| 
 | 
 242  | 
 75  | 
         DBIc_set(imp_dbh, DBIcf_AutoCommit, SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         DBIc_set(imp_dbh, DBIcf_AutoCommit, SvTRUE(valuesv));  | 
 
| 
714
 | 
 4  | 
 1007  | 
     if (strEQ(key, "ReadOnly")) {  | 
 
| 
715
 | 
 4  | 
 0  | 
         if (SvTRUE(valuesv) && !sqlite3_db_readonly(imp_dbh->db, "main")) {  | 
 
| 
 | 
 0  | 
 4  | 
         if (SvTRUE(valuesv) && !sqlite3_db_readonly(imp_dbh->db, "main")) {  | 
 
| 
 | 
 0  | 
 4  | 
         if (SvTRUE(valuesv) && !sqlite3_db_readonly(imp_dbh->db, "main")) {  | 
 
| 
 | 
 0  | 
 0  | 
         if (SvTRUE(valuesv) && !sqlite3_db_readonly(imp_dbh->db, "main")) {  | 
 
| 
 | 
 0  | 
 0  | 
         if (SvTRUE(valuesv) && !sqlite3_db_readonly(imp_dbh->db, "main")) {  | 
 
| 
 | 
 0  | 
 4  | 
         if (SvTRUE(valuesv) && !sqlite3_db_readonly(imp_dbh->db, "main")) {  | 
 
| 
 | 
 0  | 
 0  | 
         if (SvTRUE(valuesv) && !sqlite3_db_readonly(imp_dbh->db, "main")) {  | 
 
| 
 | 
 0  | 
 0  | 
         if (SvTRUE(valuesv) && !sqlite3_db_readonly(imp_dbh->db, "main")) {  | 
 
| 
 | 
 0  | 
 0  | 
         if (SvTRUE(valuesv) && !sqlite3_db_readonly(imp_dbh->db, "main")) {  | 
 
| 
 | 
 0  | 
 0  | 
         if (SvTRUE(valuesv) && !sqlite3_db_readonly(imp_dbh->db, "main")) {  | 
 
| 
 | 
 4  | 
 0  | 
         if (SvTRUE(valuesv) && !sqlite3_db_readonly(imp_dbh->db, "main")) {  | 
 
| 
 | 
 4  | 
 0  | 
         if (SvTRUE(valuesv) && !sqlite3_db_readonly(imp_dbh->db, "main")) {  | 
 
| 
 | 
 0  | 
 4  | 
         if (SvTRUE(valuesv) && !sqlite3_db_readonly(imp_dbh->db, "main")) {  | 
 
| 
 | 
 0  | 
 0  | 
         if (SvTRUE(valuesv) && !sqlite3_db_readonly(imp_dbh->db, "main")) {  | 
 
| 
 | 
 0  | 
 0  | 
         if (SvTRUE(valuesv) && !sqlite3_db_readonly(imp_dbh->db, "main")) {  | 
 
| 
 | 
 4  | 
 0  | 
         if (SvTRUE(valuesv) && !sqlite3_db_readonly(imp_dbh->db, "main")) {  | 
 
| 
 | 
 1  | 
 3  | 
         if (SvTRUE(valuesv) && !sqlite3_db_readonly(imp_dbh->db, "main")) {  | 
 
| 
721
 | 
 4  | 
 1003  | 
     if (strEQ(key, "sqlite_allow_multiple_statements")) {  | 
 
| 
722
 | 
 4  | 
 0  | 
         imp_dbh->allow_multiple_statements = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 4  | 
         imp_dbh->allow_multiple_statements = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->allow_multiple_statements = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 4  | 
         imp_dbh->allow_multiple_statements = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->allow_multiple_statements = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->allow_multiple_statements = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 4  | 
         imp_dbh->allow_multiple_statements = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->allow_multiple_statements = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->allow_multiple_statements = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->allow_multiple_statements = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->allow_multiple_statements = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->allow_multiple_statements = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 4  | 
 0  | 
         imp_dbh->allow_multiple_statements = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 4  | 
 0  | 
         imp_dbh->allow_multiple_statements = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 4  | 
         imp_dbh->allow_multiple_statements = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->allow_multiple_statements = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->allow_multiple_statements = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 4  | 
 0  | 
         imp_dbh->allow_multiple_statements = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->allow_multiple_statements = !(! SvTRUE(valuesv));  | 
 
| 
725
 | 
 1  | 
 1002  | 
     if (strEQ(key, "sqlite_use_immediate_transaction")) {  | 
 
| 
726
 | 
 1  | 
 0  | 
         imp_dbh->use_immediate_transaction = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 1  | 
         imp_dbh->use_immediate_transaction = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->use_immediate_transaction = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 1  | 
         imp_dbh->use_immediate_transaction = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->use_immediate_transaction = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->use_immediate_transaction = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 1  | 
         imp_dbh->use_immediate_transaction = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->use_immediate_transaction = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->use_immediate_transaction = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->use_immediate_transaction = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->use_immediate_transaction = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->use_immediate_transaction = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 1  | 
 0  | 
         imp_dbh->use_immediate_transaction = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 1  | 
 0  | 
         imp_dbh->use_immediate_transaction = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 1  | 
 0  | 
         imp_dbh->use_immediate_transaction = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 1  | 
         imp_dbh->use_immediate_transaction = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->use_immediate_transaction = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 1  | 
         imp_dbh->use_immediate_transaction = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->use_immediate_transaction = !(! SvTRUE(valuesv));  | 
 
| 
729
 | 
 7  | 
 995  | 
     if (strEQ(key, "sqlite_see_if_its_a_number")) {  | 
 
| 
730
 | 
 7  | 
 0  | 
         imp_dbh->see_if_its_a_number = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 7  | 
         imp_dbh->see_if_its_a_number = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->see_if_its_a_number = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 7  | 
         imp_dbh->see_if_its_a_number = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->see_if_its_a_number = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->see_if_its_a_number = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 7  | 
         imp_dbh->see_if_its_a_number = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->see_if_its_a_number = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->see_if_its_a_number = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->see_if_its_a_number = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->see_if_its_a_number = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->see_if_its_a_number = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 7  | 
 0  | 
         imp_dbh->see_if_its_a_number = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 7  | 
 0  | 
         imp_dbh->see_if_its_a_number = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 3  | 
 4  | 
         imp_dbh->see_if_its_a_number = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 3  | 
         imp_dbh->see_if_its_a_number = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->see_if_its_a_number = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 4  | 
 3  | 
         imp_dbh->see_if_its_a_number = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->see_if_its_a_number = !(! SvTRUE(valuesv));  | 
 
| 
733
 | 
 0  | 
 995  | 
     if (strEQ(key, "sqlite_extended_result_codes")) {  | 
 
| 
734
 | 
 0  | 
 0  | 
         imp_dbh->extended_result_codes = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->extended_result_codes = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->extended_result_codes = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->extended_result_codes = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->extended_result_codes = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->extended_result_codes = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->extended_result_codes = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->extended_result_codes = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->extended_result_codes = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->extended_result_codes = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->extended_result_codes = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->extended_result_codes = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->extended_result_codes = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->extended_result_codes = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->extended_result_codes = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->extended_result_codes = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->extended_result_codes = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->extended_result_codes = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->extended_result_codes = !(! SvTRUE(valuesv));  | 
 
| 
738
 | 
 34  | 
 961  | 
     if (strEQ(key, "sqlite_unicode")) {  | 
 
| 
743
 | 
 34  | 
 0  | 
         imp_dbh->unicode = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 34  | 
         imp_dbh->unicode = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->unicode = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 34  | 
         imp_dbh->unicode = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->unicode = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->unicode = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 2  | 
 32  | 
         imp_dbh->unicode = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 2  | 
 0  | 
         imp_dbh->unicode = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 2  | 
 0  | 
         imp_dbh->unicode = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 2  | 
 0  | 
         imp_dbh->unicode = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 2  | 
 0  | 
         imp_dbh->unicode = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 2  | 
 0  | 
         imp_dbh->unicode = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 32  | 
 0  | 
         imp_dbh->unicode = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 32  | 
 0  | 
         imp_dbh->unicode = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 9  | 
 23  | 
         imp_dbh->unicode = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 9  | 
         imp_dbh->unicode = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->unicode = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 23  | 
 9  | 
         imp_dbh->unicode = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->unicode = !(! SvTRUE(valuesv));  | 
 
| 
747
 | 
 0  | 
 961  | 
     if (strEQ(key, "unicode")) {  | 
 
| 
748
 | 
 0  | 
 0  | 
         if (DBIc_has(imp_dbh, DBIcf_WARN))  | 
 
| 
754
 | 
 0  | 
 0  | 
         imp_dbh->unicode = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->unicode = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->unicode = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->unicode = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->unicode = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->unicode = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->unicode = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->unicode = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->unicode = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->unicode = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->unicode = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->unicode = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->unicode = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->unicode = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->unicode = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->unicode = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->unicode = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->unicode = !(! SvTRUE(valuesv));  | 
 
| 
 | 
 0  | 
 0  | 
         imp_dbh->unicode = !(! SvTRUE(valuesv));  | 
 
| 
765
 | 
 3183  | 
 0  | 
     char *key = SvPV_nolen(keysv);  | 
 
| 
767
 | 
 3  | 
 3180  | 
     if (strEQ(key, "sqlite_version")) {  | 
 
| 
770
 | 
 2881  | 
 299  | 
     if (strEQ(key, "sqlite_allow_multiple_statements")) {  | 
 
| 
773
 | 
 2  | 
 297  | 
    if (strEQ(key, "sqlite_use_immediate_transaction")) {  | 
 
| 
776
 | 
 4  | 
 293  | 
    if (strEQ(key, "sqlite_see_if_its_a_number")) {  | 
 
| 
779
 | 
 0  | 
 293  | 
    if (strEQ(key, "sqlite_extended_result_codes")) {  | 
 
| 
782
 | 
 6  | 
 287  | 
    if (strEQ(key, "sqlite_unicode")) {  | 
 
| 
790
 | 
 0  | 
 287  | 
    if (strEQ(key, "unicode")) {  | 
 
| 
791
 | 
 0  | 
 0  | 
         if (DBIc_has(imp_dbh, DBIcf_WARN))  | 
 
| 
809
 | 
 2  | 
 209  | 
     if (!DBIc_ACTIVE(imp_dbh)) {  | 
 
| 
832
 | 
 4  | 
 1133  | 
     if (!DBIc_ACTIVE(imp_dbh)) {  | 
 
| 
838
 | 
 134  | 
 999  | 
     if (imp_dbh->unicode) {  | 
 
| 
842
 | 
 1133  | 
 0  | 
     statement = SvPV_nolen(sv_statement);  | 
 
| 
851
 | 
 0  | 
 1133  | 
     sqlite_trace(sth, imp_sth, 3, form("prepare statement: %s", statement));  | 
 
| 
861
 | 
 6  | 
 1127  | 
     if (rc != SQLITE_OK) {  | 
 
| 
863
 | 
 0  | 
 6  | 
         if (imp_sth->stmt) {  | 
 
| 
866
 | 
 0  | 
 0  | 
             if (rc != SQLITE_OK) {  | 
 
| 
872
 | 
 20  | 
 1107  | 
     if (imp_dbh->allow_multiple_statements) {  | 
 
| 
876
 | 
 0  | 
 1107  | 
         if (imp_dbh->allow_multiple_statements)  | 
 
| 
910
 | 
 1  | 
 1466  | 
     if (!DBIc_ACTIVE(imp_dbh)) {  | 
 
| 
915
 | 
 4  | 
 1462  | 
     if (!imp_sth->stmt) return 0;  | 
 
| 
921
 | 
 0  | 
 1462  | 
     sqlite_trace(sth, imp_sth, 3, form("executing %s", sqlite3_sql(imp_sth->stmt)));  | 
 
| 
923
 | 
 4  | 
 1458  | 
     if (DBIc_ACTIVE(imp_sth)) {  | 
 
| 
924
 | 
 0  | 
 4  | 
          sqlite_trace(sth, imp_sth, 3, "execute still active, reset");  | 
 
| 
926
 | 
 0  | 
 4  | 
          if (imp_sth->retval != SQLITE_OK) {  | 
 
| 
932
 | 
 943  | 
 1462  | 
     for (i = 0; i < num_params; i++) {  | 
 
| 
935
 | 
 943  | 
 0  | 
         SV *value        = pvalue ? *pvalue : &PL_sv_undef;  | 
 
| 
936
 | 
 232  | 
 711  | 
         int sql_type     = sqlite_type_from_odbc_type(sql_type_sv ? SvIV(*sql_type_sv) : SQL_UNKNOWN_TYPE);  | 
 
| 
 | 
 232  | 
 0  | 
         int sql_type     = sqlite_type_from_odbc_type(sql_type_sv ? SvIV(*sql_type_sv) : SQL_UNKNOWN_TYPE);  | 
 
| 
938
 | 
 0  | 
 943  | 
         sqlite_trace(sth, imp_sth, 4, form("bind %d type %d as %s", i, sql_type, SvPV_nolen_undef_ok(value)));  | 
 
| 
 | 
 0  | 
 0  | 
         sqlite_trace(sth, imp_sth, 4, form("bind %d type %d as %s", i, sql_type, SvPV_nolen_undef_ok(value)));  | 
 
| 
 | 
 0  | 
 0  | 
         sqlite_trace(sth, imp_sth, 4, form("bind %d type %d as %s", i, sql_type, SvPV_nolen_undef_ok(value)));  | 
 
| 
 | 
 0  | 
 0  | 
         sqlite_trace(sth, imp_sth, 4, form("bind %d type %d as %s", i, sql_type, SvPV_nolen_undef_ok(value)));  | 
 
| 
 | 
 0  | 
 0  | 
         sqlite_trace(sth, imp_sth, 4, form("bind %d type %d as %s", i, sql_type, SvPV_nolen_undef_ok(value)));  | 
 
| 
940
 | 
 3  | 
 940  | 
         if (!SvOK(value)) {  | 
 
| 
 | 
 3  | 
 0  | 
         if (!SvOK(value)) {  | 
 
| 
 | 
 3  | 
 0  | 
         if (!SvOK(value)) {  | 
 
| 
941
 | 
 0  | 
 3  | 
             sqlite_trace(sth, imp_sth, 5, "binding null");  | 
 
| 
944
 | 
 12  | 
 928  | 
         else if (sql_type == SQLITE_BLOB) {  | 
 
| 
946
 | 
 11  | 
 1  | 
             char * data = SvPVbyte(value, len);  | 
 
| 
954
 | 
 80  | 
 848  | 
             if (imp_dbh->unicode) {  | 
 
| 
957
 | 
 695  | 
 233  | 
             data = SvPV(value, len);  | 
 
| 
969
 | 
 709  | 
 219  | 
             if (sql_type == SQLITE_NULL && imp_dbh->see_if_its_a_number) {  | 
 
| 
 | 
 17  | 
 692  | 
             if (sql_type == SQLITE_NULL && imp_dbh->see_if_its_a_number) {  | 
 
| 
972
 | 
 704  | 
 207  | 
             else if (sql_type == SQLITE_INTEGER || sql_type == SQLITE_FLOAT) {  | 
 
| 
 | 
 0  | 
 704  | 
             else if (sql_type == SQLITE_INTEGER || sql_type == SQLITE_FLOAT) {  | 
 
| 
976
 | 
 214  | 
 714  | 
             if (numtype == 1 && !_sqlite_atoi64(data, &iv)) {  | 
 
| 
 | 
 214  | 
 0  | 
             if (numtype == 1 && !_sqlite_atoi64(data, &iv)) {  | 
 
| 
979
 | 
 2  | 
 712  | 
             else if (numtype == 2 && sql_type != SQLITE_INTEGER) {  | 
 
| 
 | 
 2  | 
 0  | 
             else if (numtype == 2 && sql_type != SQLITE_INTEGER) {  | 
 
| 
983
 | 
 708  | 
 4  | 
                 if (sql_type == SQLITE_INTEGER || sql_type == SQLITE_FLOAT) {  | 
 
| 
 | 
 0  | 
 708  | 
                 if (sql_type == SQLITE_INTEGER || sql_type == SQLITE_FLOAT) {  | 
 
| 
989
 | 
 0  | 
 4  | 
                     if (DBIc_has(imp_dbh, DBIcf_PrintWarn))  | 
 
| 
990
 | 
 0  | 
 0  | 
                         warn(  | 
 
| 
 | 
 0  | 
 0  | 
                         warn(  | 
 
| 
992
 | 
 0  | 
 0  | 
                             i, SvPV_nolen_undef_ok(value),  | 
 
| 
 | 
 0  | 
 0  | 
                             i, SvPV_nolen_undef_ok(value),  | 
 
| 
 | 
 0  | 
 0  | 
                             i, SvPV_nolen_undef_ok(value),  | 
 
| 
1000
 | 
 0  | 
 943  | 
         if (rc != SQLITE_OK) {  | 
 
| 
1006
 | 
 1404  | 
 58  | 
     if (sqlite3_get_autocommit(imp_dbh->db)) {  | 
 
| 
1009
 | 
 9  | 
 22  | 
         _skip_whitespaces(sql);  | 
 
| 
 | 
 9  | 
 0  | 
         _skip_whitespaces(sql);  | 
 
| 
 | 
 0  | 
 9  | 
         _skip_whitespaces(sql);  | 
 
| 
 | 
 0  | 
 0  | 
         _skip_whitespaces(sql);  | 
 
| 
 | 
 0  | 
 0  | 
         _skip_whitespaces(sql);  | 
 
| 
 | 
 0  | 
 0  | 
         _skip_whitespaces(sql);  | 
 
| 
 | 
 148  | 
 40  | 
         _skip_whitespaces(sql);  | 
 
| 
 | 
 0  | 
 40  | 
         _skip_whitespaces(sql);  | 
 
| 
 | 
 9  | 
 31  | 
         _skip_whitespaces(sql);  | 
 
| 
 | 
 0  | 
 31  | 
         _skip_whitespaces(sql);  | 
 
| 
 | 
 0  | 
 31  | 
         _skip_whitespaces(sql);  | 
 
| 
 | 
 0  | 
 31  | 
         _skip_whitespaces(sql);  | 
 
| 
 | 
 0  | 
 0  | 
         _skip_whitespaces(sql);  | 
 
| 
 | 
 0  | 
 0  | 
         _skip_whitespaces(sql);  | 
 
| 
 | 
 0  | 
 0  | 
         _skip_whitespaces(sql);  | 
 
| 
 | 
 22  | 
 1413  | 
         _skip_whitespaces(sql);  | 
 
| 
 | 
 0  | 
 1413  | 
         _skip_whitespaces(sql);  | 
 
| 
 | 
 9  | 
 1404  | 
         _skip_whitespaces(sql);  | 
 
| 
 | 
 0  | 
 1404  | 
         _skip_whitespaces(sql);  | 
 
| 
 | 
 0  | 
 1404  | 
         _skip_whitespaces(sql);  | 
 
| 
 | 
 0  | 
 1404  | 
         _skip_whitespaces(sql);  | 
 
| 
 | 
 0  | 
 1404  | 
         _skip_whitespaces(sql);  | 
 
| 
 | 
 0  | 
 0  | 
         _skip_whitespaces(sql);  | 
 
| 
1010
 | 
 6  | 
 1398  | 
         if (_starts_with_begin(sql)) {  | 
 
| 
1011
 | 
 6  | 
 0  | 
             if (DBIc_is(imp_dbh,  DBIcf_AutoCommit)) {  | 
 
| 
1012
 | 
 6  | 
 0  | 
                 if (!DBIc_is(imp_dbh,  DBIcf_BegunWork)) {  | 
 
| 
1019
 | 
 20  | 
 1378  | 
         else if (!DBIc_is(imp_dbh, DBIcf_AutoCommit)) {  | 
 
| 
1020
 | 
 0  | 
 20  | 
             sqlite_trace(sth, imp_sth, 3, "BEGIN TRAN");  | 
 
| 
1021
 | 
 20  | 
 0  | 
             if (imp_dbh->use_immediate_transaction) {  | 
 
| 
1026
 | 
 2  | 
 18  | 
             if (rc != SQLITE_OK) {  | 
 
| 
1034
 | 
 0  | 
 1460  | 
     sqlite_trace(sth, imp_sth, 3, form("Execute returned %d cols", DBIc_NUM_FIELDS(imp_sth)));  | 
 
| 
1035
 | 
 527  | 
 933  | 
     if (DBIc_NUM_FIELDS(imp_sth) == 0) {  | 
 
| 
1036
 | 
 8  | 
 519  | 
         while ((imp_sth->retval = sqlite3_step(imp_sth->stmt)) != SQLITE_DONE) {  | 
 
| 
1037
 | 
 0  | 
 8  | 
             if (imp_sth->retval == SQLITE_ROW) {  | 
 
| 
1041
 | 
 8  | 
 0  | 
             if (sqlite3_reset(imp_sth->stmt) != SQLITE_OK) {  | 
 
| 
1048
 | 
 34  | 
 485  | 
         if (DBIc_is(imp_dbh, DBIcf_BegunWork) && sqlite3_get_autocommit(imp_dbh->db)) {  | 
 
| 
 | 
 5  | 
 29  | 
         if (DBIc_is(imp_dbh, DBIcf_BegunWork) && sqlite3_get_autocommit(imp_dbh->db)) {  | 
 
| 
1049
 | 
 5  | 
 0  | 
             if (imp_dbh->began_transaction) {  | 
 
| 
1064
 | 
 927  | 
 6  | 
     switch (imp_sth->retval) {  | 
 
| 
1067
 | 
 923  | 
 4  | 
             DBIc_ACTIVE_on(imp_sth);  | 
 
| 
 | 
 923  | 
 0  | 
             DBIc_ACTIVE_on(imp_sth);  | 
 
| 
 | 
 923  | 
 0  | 
             DBIc_ACTIVE_on(imp_sth);  | 
 
| 
 | 
 0  | 
 923  | 
             DBIc_ACTIVE_on(imp_sth);  | 
 
| 
1068
 | 
 0  | 
 927  | 
             sqlite_trace(sth, imp_sth, 5, form("exec ok - %d rows, %d cols", imp_sth->nrow, DBIc_NUM_FIELDS(imp_sth)));  | 
 
| 
1069
 | 
 895  | 
 32  | 
             if (DBIc_is(imp_dbh, DBIcf_AutoCommit) && !sqlite3_get_autocommit(imp_dbh->db)) {  | 
 
| 
 | 
 0  | 
 895  | 
             if (DBIc_is(imp_dbh, DBIcf_AutoCommit) && !sqlite3_get_autocommit(imp_dbh->db)) {  | 
 
| 
1081
 | 
 6  | 
 0  | 
             if (sqlite3_reset(imp_sth->stmt) != SQLITE_OK) {  | 
 
| 
1100
 | 
 0  | 
 2115  | 
     if (!DBIc_ACTIVE(imp_dbh)) {  | 
 
| 
1108
 | 
 0  | 
 2115  | 
     sqlite_trace(sth, imp_sth, 6, form("numFields == %d, nrow == %d", numFields, imp_sth->nrow));  | 
 
| 
1110
 | 
 2  | 
 2113  | 
     if (!DBIc_ACTIVE(imp_sth)) {  | 
 
| 
1114
 | 
 630  | 
 1483  | 
     if (imp_sth->retval == SQLITE_DONE) {  | 
 
| 
1119
 | 
 0  | 
 1483  | 
     if (imp_sth->retval != SQLITE_ROW) {  | 
 
| 
1129
 | 
 2761  | 
 1483  | 
     for (i = 0; i < numFields; i++) {  | 
 
| 
1134
 | 
 733  | 
 2028  | 
         if (sql_type && SvOK(*sql_type)) {  | 
 
| 
 | 
 0  | 
 733  | 
         if (sql_type && SvOK(*sql_type)) {  | 
 
| 
 | 
 0  | 
 0  | 
         if (sql_type && SvOK(*sql_type)) {  | 
 
| 
 | 
 0  | 
 0  | 
         if (sql_type && SvOK(*sql_type)) {  | 
 
| 
1135
 | 
 733  | 
 0  | 
             if (SvIV(*sql_type)) {  | 
 
| 
 | 
 12  | 
 721  | 
             if (SvIV(*sql_type)) {  | 
 
| 
1136
 | 
 12  | 
 0  | 
                 col_type = sqlite_type_from_odbc_type(SvIV(*sql_type));  | 
 
| 
1141
 | 
 0  | 
 1072  | 
                 sqlite_trace(sth, imp_sth, 5, form("fetch column %d as integer", i));  | 
 
| 
1154
 | 
 0  | 
 8  | 
                 sqlite_trace(sth, imp_sth, 5, form("fetch column %d as float", i));  | 
 
| 
1158
 | 
 0  | 
 1421  | 
                 sqlite_trace(sth, imp_sth, 5, form("fetch column %d as text", i));  | 
 
| 
1162
 | 
 3  | 
 1418  | 
                 if (chopBlanks) {  | 
 
| 
1163
 | 
 4  | 
 1  | 
                     while((len > 0) && (val[len-1] == ' ')) {  | 
 
| 
 | 
 2  | 
 2  | 
                     while((len > 0) && (val[len-1] == ' ')) {  | 
 
| 
1168
 | 
 323  | 
 1098  | 
                 if (imp_dbh->unicode) {  | 
 
| 
1175
 | 
 0  | 
 22  | 
                 sqlite_trace(sth, imp_sth, 5, form("fetch column %d as blob", i));  | 
 
| 
1178
 | 
 21  | 
 1  | 
                 sv_setpvn(AvARRAY(av)[i], len ? val : "", len);  | 
 
| 
1182
 | 
 0  | 
 238  | 
                 sqlite_trace(sth, imp_sth, 5, form("fetch column %d as default", i));  | 
 
| 
1187
 | 
 0  | 
 2761  | 
         SvSETMAGIC(AvARRAY(av)[i]);  | 
 
| 
1206
 | 
 4  | 
 922  | 
     if (!DBIc_ACTIVE(imp_sth))  | 
 
| 
1209
 | 
 922  | 
 0  | 
     DBIc_ACTIVE_off(imp_sth);  | 
 
| 
 | 
 922  | 
 0  | 
     DBIc_ACTIVE_off(imp_sth);  | 
 
| 
 | 
 922  | 
 0  | 
     DBIc_ACTIVE_off(imp_sth);  | 
 
| 
 | 
 922  | 
 0  | 
     DBIc_ACTIVE_off(imp_sth);  | 
 
| 
 | 
 0  | 
 922  | 
     DBIc_ACTIVE_off(imp_sth);  | 
 
| 
1213
 | 
 0  | 
 922  | 
     if (!DBIc_ACTIVE(imp_dbh))  /* no longer connected  */  | 
 
| 
1216
 | 
 57  | 
 865  | 
     if (is_destroy) {  | 
 
| 
1220
 | 
 0  | 
 865  | 
     if ((imp_sth->retval = sqlite3_reset(imp_sth->stmt)) != SQLITE_OK) {  | 
 
| 
1244
 | 
 0  | 
 1127  | 
     DBIc_ACTIVE_off(imp_sth);  | 
 
| 
 | 
 0  | 
 0  | 
     DBIc_ACTIVE_off(imp_sth);  | 
 
| 
 | 
 0  | 
 0  | 
     DBIc_ACTIVE_off(imp_sth);  | 
 
| 
 | 
 0  | 
 0  | 
     DBIc_ACTIVE_off(imp_sth);  | 
 
| 
 | 
 0  | 
 0  | 
     DBIc_ACTIVE_off(imp_sth);  | 
 
| 
1245
 | 
 1117  | 
 10  | 
     if (DBIc_ACTIVE(imp_dbh)) {  | 
 
| 
1246
 | 
 1113  | 
 4  | 
         if (imp_sth->stmt) {  | 
 
| 
1248
 | 
 0  | 
 1113  | 
             sqlite_trace(sth, imp_sth, 4, form("destroy statement: %s", sqlite3_sql(imp_sth->stmt)));  | 
 
| 
1254
 | 
 0  | 
 1113  | 
             sqlite_trace( sth, imp_sth, 1, form("Finalizing statement: %p", imp_sth->stmt) );  | 
 
| 
1256
 | 
 0  | 
 1113  | 
             if (rc != SQLITE_OK) {  | 
 
| 
1263
 | 
 1139  | 
 0  | 
             while( i ) {  | 
 
| 
1264
 | 
 1113  | 
 26  | 
                 if ( i->stmt == imp_sth->stmt ) {  | 
 
| 
1265
 | 
 26  | 
 1087  | 
                     if ( temp != i ) temp->prev = i->prev;  | 
 
| 
1266
 | 
 1087  | 
 26  | 
                     if ( i == imp_dbh->stmt_list ) imp_dbh->stmt_list = i->prev;  | 
 
| 
1267
 | 
 0  | 
 1113  | 
                     sqlite_trace( sth, imp_sth, 1, form("Removing statement from list: %p", imp_sth->stmt) );  | 
 
| 
1279
 | 
 20  | 
 1107  | 
     if (imp_dbh->allow_multiple_statements)  | 
 
| 
1306
 | 
 885  | 
 0  | 
     char *key = SvPV_nolen(keysv);  | 
 
| 
1313
 | 
 1  | 
 884  | 
     if (!DBIc_ACTIVE(imp_dbh)) {  | 
 
| 
1318
 | 
 16  | 
 868  | 
     if (strEQ(key, "sqlite_unprepared_statements")) {  | 
 
| 
1330
 | 
 488  | 
 380  | 
     if (strEQ(key, "NAME")) {  | 
 
| 
1335
 | 
 2040  | 
 488  | 
         for (n = 0; n < i; n++) {  | 
 
| 
1338
 | 
 2040  | 
 0  | 
             if (fieldname) {  | 
 
| 
1344
 | 
 216  | 
 1824  | 
                 if (imp_dbh->unicode)  | 
 
| 
1350
 | 
 0  | 
 380  | 
     else if (strEQ(key, "PRECISION")) {  | 
 
| 
1354
 | 
 2  | 
 378  | 
     else if (strEQ(key, "TYPE")) {  | 
 
| 
1358
 | 
 6  | 
 2  | 
         for (n = 0; n < i; n++) {  | 
 
| 
1364
 | 
 6  | 
 0  | 
             if (fieldtype)  | 
 
| 
1370
 | 
 1  | 
 377  | 
     else if (strEQ(key, "NULLABLE")) {  | 
 
| 
1375
 | 
 4  | 
 1  | 
         for (n = 0; n < i; n++) {  | 
 
| 
1382
 | 
 0  | 
 4  | 
             if (rc != SQLITE_OK) {  | 
 
| 
1392
 | 
 0  | 
 377  | 
     else if (strEQ(key, "SCALE")) {  | 
 
| 
1396
 | 
 51  | 
 326  | 
     else if (strEQ(key, "NUM_OF_FIELDS")) {  | 
 
| 
1399
 | 
 124  | 
 202  | 
     else if (strEQ(key, "NUM_OF_PARAMS")) {  | 
 
| 
1402
 | 
 4  | 
 198  | 
     else if (strEQ(key, "ParamValues")) {  | 
 
| 
1405
 | 
 4  | 
 0  | 
         if (num_params) {  | 
 
| 
1406
 | 
 4  | 
 4  | 
             for (n = 0; n < num_params; n++) {  | 
 
| 
1408
 | 
 3  | 
 1  | 
                 SV *value   = pvalue ? *pvalue : &PL_sv_undef;  | 
 
| 
1410
 | 
 1  | 
 3  | 
                 SV *sv_name = pname ? newSVpv(pname, 0) : newSViv(n + 1);  | 
 
| 
1435
 | 
 0  | 
 951  | 
     if (is_inout) {  | 
 
| 
1440
 | 
 7  | 
 944  | 
     if (!looks_like_number(param)) {  | 
 
| 
1443
 | 
 7  | 
 0  | 
         paramstring = SvPV(param, len);  | 
 
| 
1444
 | 
 7  | 
 0  | 
         if(paramstring[len] == 0 && strlen(paramstring) == len) {  | 
 
| 
 | 
 7  | 
 0  | 
         if(paramstring[len] == 0 && strlen(paramstring) == len) {  | 
 
| 
1446
 | 
 1  | 
 6  | 
             if (pos == 0) {  | 
 
| 
1458
 | 
 944  | 
 0  | 
         pos = 2 * (SvIV(param) - 1);  | 
 
| 
1460
 | 
 0  | 
 950  | 
     sqlite_trace(sth, imp_sth, 3, form("bind into 0x%p: %"IVdf" => %s (%"IVdf") pos %d", imp_sth->params, SvIV(param), SvPV_nolen_undef_ok(value), sql_type, pos));  | 
 
| 
 | 
 0  | 
 0  | 
     sqlite_trace(sth, imp_sth, 3, form("bind into 0x%p: %"IVdf" => %s (%"IVdf") pos %d", imp_sth->params, SvIV(param), SvPV_nolen_undef_ok(value), sql_type, pos));  | 
 
| 
 | 
 0  | 
 0  | 
     sqlite_trace(sth, imp_sth, 3, form("bind into 0x%p: %"IVdf" => %s (%"IVdf") pos %d", imp_sth->params, SvIV(param), SvPV_nolen_undef_ok(value), sql_type, pos));  | 
 
| 
 | 
 0  | 
 0  | 
     sqlite_trace(sth, imp_sth, 3, form("bind into 0x%p: %"IVdf" => %s (%"IVdf") pos %d", imp_sth->params, SvIV(param), SvPV_nolen_undef_ok(value), sql_type, pos));  | 
 
| 
 | 
 0  | 
 0  | 
     sqlite_trace(sth, imp_sth, 3, form("bind into 0x%p: %"IVdf" => %s (%"IVdf") pos %d", imp_sth->params, SvIV(param), SvPV_nolen_undef_ok(value), sql_type, pos));  | 
 
| 
 | 
 0  | 
 0  | 
     sqlite_trace(sth, imp_sth, 3, form("bind into 0x%p: %"IVdf" => %s (%"IVdf") pos %d", imp_sth->params, SvIV(param), SvPV_nolen_undef_ok(value), sql_type, pos));  | 
 
| 
1462
 | 
 165  | 
 785  | 
     if (sql_type) {  | 
 
| 
1475
 | 
 235  | 
 0  | 
     av_store(imp_sth->col_types, SvIV(col)-1, newSViv(sql_type));  | 
 
| 
1495
 | 
 130  | 
 13  | 
     while((option = sqlite3_compileoption_get(i++))) {  | 
 
| 
1531
 | 
 1  | 
 0  | 
     _stores_status(SQLITE_STATUS_MEMORY_USED, "memory_used");  | 
 
| 
1532
 | 
 1  | 
 0  | 
     _stores_status(SQLITE_STATUS_PAGECACHE_USED, "pagecache_used");  | 
 
| 
1533
 | 
 1  | 
 0  | 
     _stores_status(SQLITE_STATUS_PAGECACHE_OVERFLOW, "pagecache_overflow");  | 
 
| 
1534
 | 
 1  | 
 0  | 
     _stores_status(SQLITE_STATUS_SCRATCH_USED, "scratch_used");  | 
 
| 
1536
 | 
 1  | 
 0  | 
     _stores_status(SQLITE_STATUS_SCRATCH_OVERFLOW, "scratch_overflow");  | 
 
| 
1538
 | 
 1  | 
 0  | 
     _stores_status(SQLITE_STATUS_MALLOC_SIZE, "malloc_size");  | 
 
| 
1539
 | 
 1  | 
 0  | 
     _stores_status(SQLITE_STATUS_PARSER_STACK, "parser_stack");  | 
 
| 
1540
 | 
 1  | 
 0  | 
     _stores_status(SQLITE_STATUS_PAGECACHE_SIZE, "pagecache_size");  | 
 
| 
1541
 | 
 1  | 
 0  | 
     _stores_status(SQLITE_STATUS_SCRATCH_SIZE, "scratch_size");  | 
 
| 
1543
 | 
 1  | 
 0  | 
     _stores_status(SQLITE_STATUS_MALLOC_COUNT, "malloc_count");  | 
 
| 
1545
 | 
 1  | 
 0  | 
     _stores_status(SQLITE_STATUS_SCRATCH_OVERFLOW, "scratch_overflow");  | 
 
| 
1558
 | 
 2  | 
 0  | 
     _stores_dbstatus(SQLITE_DBSTATUS_LOOKASIDE_USED, "lookaside_used");  | 
 
| 
1560
 | 
 2  | 
 0  | 
     _stores_dbstatus(SQLITE_DBSTATUS_CACHE_USED, "cache_used");  | 
 
| 
1563
 | 
 2  | 
 0  | 
     _stores_dbstatus(SQLITE_DBSTATUS_SCHEMA_USED, "schema_used");  | 
 
| 
1564
 | 
 2  | 
 0  | 
     _stores_dbstatus(SQLITE_DBSTATUS_STMT_USED, "stmt_used");  | 
 
| 
1567
 | 
 2  | 
 0  | 
     _stores_dbstatus(SQLITE_DBSTATUS_LOOKASIDE_HIT, "lookaside_hit");  | 
 
| 
1568
 | 
 2  | 
 0  | 
     _stores_dbstatus(SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE, "lookaside_miss_size");  | 
 
| 
1569
 | 
 2  | 
 0  | 
     _stores_dbstatus(SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL, "lookaside_miss_full");  | 
 
| 
1572
 | 
 2  | 
 0  | 
     _stores_dbstatus(SQLITE_DBSTATUS_CACHE_HIT, "cache_hit");  | 
 
| 
1573
 | 
 2  | 
 0  | 
     _stores_dbstatus(SQLITE_DBSTATUS_CACHE_MISS, "cache_miss");  | 
 
| 
1576
 | 
 2  | 
 0  | 
     _stores_dbstatus(SQLITE_DBSTATUS_CACHE_WRITE, "cache_write");  | 
 
| 
1605
 | 
 2  | 
 9  | 
     if (!imp_dbh->db) {  | 
 
| 
1614
 | 
 9  | 
 0  | 
     return filename ? newSVpv(filename, 0) : &PL_sv_undef;  | 
 
| 
1624
 | 
 20  | 
 6  | 
     if (timeout && SvIOK(timeout)) {  | 
 
| 
 | 
 20  | 
 0  | 
     if (timeout && SvIOK(timeout)) {  | 
 
| 
1625
 | 
 20  | 
 0  | 
         imp_dbh->timeout = SvIV(timeout);  | 
 
| 
1626
 | 
 4  | 
 16  | 
         if (!DBIc_ACTIVE(imp_dbh)) {  | 
 
| 
1649
 | 
 0  | 
 514  | 
     PUSHMARK(SP);  | 
 
| 
1650
 | 
 924  | 
 514  | 
     for ( i=0; i < argc; i++ ) {  | 
 
| 
1651
 | 
 0  | 
 924  | 
         XPUSHs(stacked_sv_from_sqlite3_value(aTHX_ value[i], is_unicode));  | 
 
| 
1660
 | 
 514  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 514  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 514  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 514  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 514  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 514  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 514  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 514  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 514  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 514  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 514  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 508  | 
 6  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 508  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 508  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 6  | 
 508  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
1661
 | 
 6  | 
 0  | 
         sqlite_set_result(aTHX_ context, ERRSV, 1);  | 
 
| 
1663
 | 
 0  | 
 508  | 
     } else if ( count != 1 ) {  | 
 
| 
1669
 | 
 0  | 
 0  | 
         for ( i=0; i < count; i++ ) {  | 
 
| 
1677
 | 
 514  | 
 0  | 
     FREETMPS;  | 
 
| 
1700
 | 
 4  | 
 304  | 
     if (!DBIc_ACTIVE(imp_dbh)) {  | 
 
| 
1712
 | 
 27  | 
 277  | 
     rc = sqlite3_create_function( imp_dbh->db, name, argc, SQLITE_UTF8|flags,  | 
 
| 
1717
 | 
 0  | 
 304  | 
     if ( rc != SQLITE_OK ) {  | 
 
| 
1732
 | 
 4  | 
 0  | 
     if (!DBIc_ACTIVE(imp_dbh)) {  | 
 
| 
1741
 | 
 0  | 
 0  | 
     if ( rc != SQLITE_OK ) {  | 
 
| 
1754
 | 
 0  | 
 0  | 
     if (!DBIc_ACTIVE(imp_dbh)) {  | 
 
| 
1763
 | 
 0  | 
 0  | 
     if ( rc != SQLITE_OK ) {  | 
 
| 
1781
 | 
 2  | 
 12  | 
     if (!DBIc_ACTIVE(imp_dbh)) {  | 
 
| 
1789
 | 
 12  | 
 0  | 
     if (!tablename || !SvPOK(tablename)) {  | 
 
| 
 | 
 2  | 
 10  | 
     if (!tablename || !SvPOK(tablename)) {  | 
 
| 
1793
 | 
 10  | 
 0  | 
     if (!columnname || !SvPOK(columnname)) {  | 
 
| 
 | 
 2  | 
 8  | 
     if (!columnname || !SvPOK(columnname)) {  | 
 
| 
1799
 | 
 8  | 
 0  | 
     rc = sqlite3_table_column_metadata(  | 
 
| 
 | 
 8  | 
 0  | 
     rc = sqlite3_table_column_metadata(  | 
 
| 
 | 
 8  | 
 0  | 
     rc = sqlite3_table_column_metadata(  | 
 
| 
 | 
 0  | 
 0  | 
     rc = sqlite3_table_column_metadata(  | 
 
| 
1801
 | 
 0  | 
 8  | 
        (dbname && SvPOK(dbname)) ? SvPV_nolen(dbname) : NULL,  | 
 
| 
1807
 | 
 4  | 
 4  | 
     if (rc == SQLITE_OK) {  | 
 
| 
1808
 | 
 2  | 
 2  | 
         hv_stores(metadata, "data_type", datatype ? newSVpv(datatype, 0) : newSV(0));  | 
 
| 
1809
 | 
 4  | 
 0  | 
         hv_stores(metadata, "collation_name", collseq ? newSVpv(collseq, 0) : newSV(0));  | 
 
| 
1829
 | 
 0  | 
 96  | 
     if ( !pkg )  | 
 
| 
1835
 | 
 0  | 
 96  | 
     PUSHMARK(SP);  | 
 
| 
1836
 | 
 0  | 
 96  | 
     XPUSHs( sv_2mortal( newSVsv(pkg) ) );  | 
 
| 
1844
 | 
 96  | 
 0  | 
     if ( SvTRUE( ERRSV ) ) {  | 
 
| 
 | 
 96  | 
 0  | 
     if ( SvTRUE( ERRSV ) ) {  | 
 
| 
 | 
 96  | 
 0  | 
     if ( SvTRUE( ERRSV ) ) {  | 
 
| 
 | 
 0  | 
 96  | 
     if ( SvTRUE( ERRSV ) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if ( SvTRUE( ERRSV ) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if ( SvTRUE( ERRSV ) ) {  | 
 
| 
 | 
 96  | 
 0  | 
     if ( SvTRUE( ERRSV ) ) {  | 
 
| 
 | 
 0  | 
 96  | 
     if ( SvTRUE( ERRSV ) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if ( SvTRUE( ERRSV ) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if ( SvTRUE( ERRSV ) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if ( SvTRUE( ERRSV ) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if ( SvTRUE( ERRSV ) ) {  | 
 
| 
 | 
 96  | 
 0  | 
     if ( SvTRUE( ERRSV ) ) {  | 
 
| 
 | 
 96  | 
 0  | 
     if ( SvTRUE( ERRSV ) ) {  | 
 
| 
 | 
 96  | 
 0  | 
     if ( SvTRUE( ERRSV ) ) {  | 
 
| 
 | 
 96  | 
 0  | 
     if ( SvTRUE( ERRSV ) ) {  | 
 
| 
 | 
 96  | 
 0  | 
     if ( SvTRUE( ERRSV ) ) {  | 
 
| 
 | 
 84  | 
 12  | 
     if ( SvTRUE( ERRSV ) ) {  | 
 
| 
 | 
 84  | 
 0  | 
     if ( SvTRUE( ERRSV ) ) {  | 
 
| 
 | 
 0  | 
 84  | 
     if ( SvTRUE( ERRSV ) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if ( SvTRUE( ERRSV ) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if ( SvTRUE( ERRSV ) ) {  | 
 
| 
 | 
 12  | 
 84  | 
     if ( SvTRUE( ERRSV ) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if ( SvTRUE( ERRSV ) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if ( SvTRUE( ERRSV ) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if ( SvTRUE( ERRSV ) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if ( SvTRUE( ERRSV ) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if ( SvTRUE( ERRSV ) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if ( SvTRUE( ERRSV ) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if ( SvTRUE( ERRSV ) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if ( SvTRUE( ERRSV ) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if ( SvTRUE( ERRSV ) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if ( SvTRUE( ERRSV ) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if ( SvTRUE( ERRSV ) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if ( SvTRUE( ERRSV ) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if ( SvTRUE( ERRSV ) ) {  | 
 
| 
1845
 | 
 12  | 
 0  | 
         aggr_info->err =  newSVpvf("error during aggregator's new(): %s",  | 
 
| 
1846
 | 
 12  | 
 0  | 
                                     SvPV_nolen (ERRSV));  | 
 
| 
 | 
 12  | 
 0  | 
                                     SvPV_nolen (ERRSV));  | 
 
| 
 | 
 0  | 
 0  | 
                                     SvPV_nolen (ERRSV));  | 
 
| 
1848
 | 
 0  | 
 84  | 
     } else if ( count != 1 ) {  | 
 
| 
1854
 | 
 0  | 
 0  | 
         for ( i=0; i < count; i++ ) {  | 
 
| 
1859
 | 
 78  | 
 6  | 
         if ( SvROK(aggr) ) {  | 
 
| 
1868
 | 
 96  | 
 0  | 
     FREETMPS;  | 
 
| 
1884
 | 
 0  | 
 144  | 
     if ( !aggr )  | 
 
| 
1891
 | 
 60  | 
 84  | 
     if ( !aggr->inited ) {  | 
 
| 
1895
 | 
 96  | 
 48  | 
     if ( aggr->err || !aggr->aggr_inst )  | 
 
| 
 | 
 96  | 
 0  | 
     if ( aggr->err || !aggr->aggr_inst )  | 
 
| 
1899
 | 
 0  | 
 96  | 
     PUSHMARK(SP);  | 
 
| 
1900
 | 
 0  | 
 96  | 
     XPUSHs( sv_2mortal( newSVsv( aggr->aggr_inst ) ));  | 
 
| 
1901
 | 
 36  | 
 96  | 
     for ( i=0; i < argc; i++ ) {  | 
 
| 
1902
 | 
 0  | 
 36  | 
         XPUSHs(stacked_sv_from_sqlite3_value(aTHX_ value[i], is_unicode));  | 
 
| 
1909
 | 
 96  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 96  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 96  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 96  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 96  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 96  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 96  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 96  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 96  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 96  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 96  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 90  | 
 6  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 90  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 90  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 6  | 
 90  | 
     if (SvTRUE(ERRSV) ) {  | 
 
| 
1910
 | 
 6  | 
 0  | 
       aggr->err = newSVpvf("error during aggregator's step(): %s",  | 
 
| 
1911
 | 
 6  | 
 0  | 
                             SvPV_nolen(ERRSV));  | 
 
| 
 | 
 6  | 
 0  | 
                             SvPV_nolen(ERRSV));  | 
 
| 
 | 
 0  | 
 0  | 
                             SvPV_nolen(ERRSV));  | 
 
| 
1916
 | 
 96  | 
 48  | 
     FREETMPS;  | 
 
| 
1933
 | 
 36  | 
 60  | 
     if ( !aggr ) {  | 
 
| 
1942
 | 
 72  | 
 24  | 
     if  ( ! aggr->err && aggr->aggr_inst ) {  | 
 
| 
 | 
 72  | 
 0  | 
     if  ( ! aggr->err && aggr->aggr_inst ) {  | 
 
| 
1943
 | 
 0  | 
 72  | 
         PUSHMARK(SP);  | 
 
| 
1944
 | 
 0  | 
 72  | 
         XPUSHs( sv_2mortal( newSVsv( aggr->aggr_inst )) );  | 
 
| 
1950
 | 
 72  | 
 0  | 
         if ( SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 72  | 
 0  | 
         if ( SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 72  | 
 0  | 
         if ( SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 72  | 
         if ( SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
         if ( SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
         if ( SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 72  | 
 0  | 
         if ( SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 72  | 
         if ( SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
         if ( SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
         if ( SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
         if ( SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
         if ( SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 72  | 
 0  | 
         if ( SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 72  | 
 0  | 
         if ( SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 72  | 
 0  | 
         if ( SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 72  | 
 0  | 
         if ( SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 72  | 
 0  | 
         if ( SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 60  | 
 12  | 
         if ( SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 60  | 
 0  | 
         if ( SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 60  | 
         if ( SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
         if ( SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
         if ( SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 12  | 
 60  | 
         if ( SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
         if ( SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
         if ( SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
         if ( SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
         if ( SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
         if ( SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
         if ( SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
         if ( SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
         if ( SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
         if ( SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
         if ( SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
         if ( SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
         if ( SvTRUE(ERRSV) ) {  | 
 
| 
 | 
 0  | 
 0  | 
         if ( SvTRUE(ERRSV) ) {  | 
 
| 
1951
 | 
 12  | 
 0  | 
             aggr->err = newSVpvf("error during aggregator's finalize(): %s",  | 
 
| 
1952
 | 
 12  | 
 0  | 
                                   SvPV_nolen(ERRSV) ) ;  | 
 
| 
 | 
 12  | 
 0  | 
                                   SvPV_nolen(ERRSV) ) ;  | 
 
| 
 | 
 0  | 
 0  | 
                                   SvPV_nolen(ERRSV) ) ;  | 
 
| 
1954
 | 
 0  | 
 60  | 
         } else if ( count != 1 ) {  | 
 
| 
1959
 | 
 0  | 
 0  | 
             for ( i=0; i
 | 
 
| 
1968
 | 
 36  | 
 60  | 
     if ( aggr->err ) {  | 
 
| 
1969
 | 
 36  | 
 0  | 
         warn( "DBD::SQLeet: error in aggregator cannot be reported to SQLite: %s",  | 
 
| 
1977
 | 
 78  | 
 18  | 
     if ( aggr->aggr_inst ) {  | 
 
| 
1982
 | 
 96  | 
 0  | 
     FREETMPS;  | 
 
| 
1993
 | 
 4  | 
 36  | 
     if (!DBIc_ACTIVE(imp_dbh)) {  | 
 
| 
2011
 | 
 0  | 
 36  | 
     if ( rc != SQLITE_OK ) {  | 
 
| 
2029
 | 
 0  | 
 396  | 
     PUSHMARK(SP);  | 
 
| 
2030
 | 
 0  | 
 396  | 
     XPUSHs( sv_2mortal( newSVpvn( string1, len1) ) );  | 
 
| 
2031
 | 
 0  | 
 396  | 
     XPUSHs( sv_2mortal( newSVpvn( string2, len2) ) );  | 
 
| 
2035
 | 
 0  | 
 396  | 
     if (n_retval != 1) {  | 
 
| 
2038
 | 
 396  | 
 396  | 
     for(i = 0; i < n_retval; i++) {  | 
 
| 
2039
 | 
 396  | 
 0  | 
         cmp = POPi;  | 
 
| 
2042
 | 
 396  | 
 0  | 
     FREETMPS;  | 
 
| 
2060
 | 
 0  | 
 348  | 
     PUSHMARK(SP);  | 
 
| 
2065
 | 
 0  | 
 348  | 
     XPUSHs( sv_2mortal( sv1 ) );  | 
 
| 
2066
 | 
 0  | 
 348  | 
     XPUSHs( sv_2mortal( sv2 ) );  | 
 
| 
2070
 | 
 0  | 
 348  | 
     if (n_retval != 1) {  | 
 
| 
2073
 | 
 348  | 
 348  | 
     for(i = 0; i < n_retval; i++) {  | 
 
| 
2074
 | 
 348  | 
 0  | 
         cmp = POPi;  | 
 
| 
2077
 | 
 348  | 
 0  | 
     FREETMPS;  | 
 
| 
2093
 | 
 8  | 
 16  | 
     if (!DBIc_ACTIVE(imp_dbh)) {  | 
 
| 
2102
 | 
 0  | 
 16  | 
     if (rv != 0) {  | 
 
| 
2103
 | 
 0  | 
 0  | 
         sqlite_trace(dbh, imp_dbh, 3, form("improper collation function: %s(aa, aa) returns %d!", name, rv));  | 
 
| 
2107
 | 
 0  | 
 16  | 
     if (rv2 != (rv * -1)) {  | 
 
| 
2108
 | 
 0  | 
 0  | 
         sqlite_trace(dbh, imp_dbh, 3, form("improper collation function: '%s' is not symmetric", name));  | 
 
| 
2115
 | 
 8  | 
 8  | 
     rv = sqlite3_create_collation(  | 
 
| 
2122
 | 
 0  | 
 16  | 
     if ( rv != SQLITE_OK ) {  | 
 
| 
2144
 | 
 0  | 
 12  | 
     PUSHMARK(SP);  | 
 
| 
2145
 | 
 0  | 
 12  | 
     XPUSHs( dbh );  | 
 
| 
2146
 | 
 0  | 
 12  | 
     XPUSHs( sv_2mortal( newSVpv( collation_name, 0) ) );  | 
 
| 
2153
 | 
 12  | 
 0  | 
     FREETMPS;  | 
 
| 
2162
 | 
 4  | 
 248  | 
     if (!DBIc_ACTIVE(imp_dbh)) {  | 
 
| 
2173
 | 
 0  | 
 248  | 
     (void) sqlite3_collation_needed( imp_dbh->db,  | 
 
| 
2174
 | 
 0  | 
 0  | 
                                      (void*) (SvOK(callback) ? dbh : NULL),  | 
 
| 
 | 
 0  | 
 0  | 
                                      (void*) (SvOK(callback) ? dbh : NULL),  | 
 
| 
2188
 | 
 0  | 
 332  | 
     PUSHMARK(SP);  | 
 
| 
2191
 | 
 0  | 
 332  | 
     if ( n_retval != 1 ) {  | 
 
| 
2194
 | 
 332  | 
 332  | 
     for(i = 0; i < n_retval; i++) {  | 
 
| 
2195
 | 
 332  | 
 0  | 
         retval = POPi;  | 
 
| 
2198
 | 
 332  | 
 0  | 
     FREETMPS;  | 
 
| 
2209
 | 
 4  | 
 4  | 
     if (!DBIc_ACTIVE(imp_dbh)) {  | 
 
| 
2216
 | 
 2  | 
 2  | 
     if (!SvOK(handler)) {  | 
 
| 
 | 
 2  | 
 0  | 
     if (!SvOK(handler)) {  | 
 
| 
 | 
 2  | 
 0  | 
     if (!SvOK(handler)) {  | 
 
| 
2240
 | 
 4  | 
 8  | 
     if (!DBIc_ACTIVE(imp_dbh)) {  | 
 
| 
2247
 | 
 4  | 
 4  | 
     if (!SvOK(hook)) {  | 
 
| 
 | 
 4  | 
 0  | 
     if (!SvOK(hook)) {  | 
 
| 
 | 
 4  | 
 0  | 
     if (!SvOK(hook)) {  | 
 
| 
2263
 | 
 4  | 
 4  | 
     return retval ? newSVsv(retval) : &PL_sv_undef;  | 
 
| 
2272
 | 
 4  | 
 4  | 
     if (!DBIc_ACTIVE(imp_dbh)) {  | 
 
| 
2279
 | 
 2  | 
 2  | 
     if (!SvOK(hook)) {  | 
 
| 
 | 
 2  | 
 0  | 
     if (!SvOK(hook)) {  | 
 
| 
 | 
 2  | 
 0  | 
     if (!SvOK(hook)) {  | 
 
| 
2296
 | 
 2  | 
 2  | 
     return retval ? newSVsv(retval) : &PL_sv_undef;  | 
 
| 
2309
 | 
 0  | 
 60  | 
     PUSHMARK(SP);  | 
 
| 
2311
 | 
 0  | 
 60  | 
     XPUSHs( sv_2mortal( newSViv( op          ) ) );  | 
 
| 
2312
 | 
 0  | 
 60  | 
     XPUSHs( sv_2mortal( newSVpv( database, 0 ) ) );  | 
 
| 
2313
 | 
 0  | 
 60  | 
     XPUSHs( sv_2mortal( newSVpv( table,    0 ) ) );  | 
 
| 
2314
 | 
 0  | 
 60  | 
     XPUSHs( sv_2mortal( newSViv( (IV)rowid   ) ) );  | 
 
| 
2321
 | 
 60  | 
 0  | 
     FREETMPS;  | 
 
| 
2331
 | 
 4  | 
 4  | 
     if (!DBIc_ACTIVE(imp_dbh)) {  | 
 
| 
2338
 | 
 2  | 
 2  | 
     if (!SvOK(hook)) {  | 
 
| 
 | 
 2  | 
 0  | 
     if (!SvOK(hook)) {  | 
 
| 
 | 
 2  | 
 0  | 
     if (!SvOK(hook)) {  | 
 
| 
2354
 | 
 2  | 
 2  | 
     return retval ? newSVsv(retval) : &PL_sv_undef;  | 
 
| 
2374
 | 
 0  | 
 4  | 
     PUSHMARK(SP);  | 
 
| 
2376
 | 
 0  | 
 4  | 
     XPUSHs( sv_2mortal ( newSViv ( action_code ) ) );  | 
 
| 
2379
 | 
 0  | 
 4  | 
     XPUSHs( sv_2mortal( details_1 ? newSVpv( details_1, 0 ) : &PL_sv_undef ) );  | 
 
| 
 | 
 4  | 
 0  | 
     XPUSHs( sv_2mortal( details_1 ? newSVpv( details_1, 0 ) : &PL_sv_undef ) );  | 
 
| 
2380
 | 
 0  | 
 4  | 
     XPUSHs( sv_2mortal( details_2 ? newSVpv( details_2, 0 ) : &PL_sv_undef ) );  | 
 
| 
 | 
 0  | 
 4  | 
     XPUSHs( sv_2mortal( details_2 ? newSVpv( details_2, 0 ) : &PL_sv_undef ) );  | 
 
| 
2381
 | 
 0  | 
 4  | 
     XPUSHs( sv_2mortal( details_3 ? newSVpv( details_3, 0 ) : &PL_sv_undef ) );  | 
 
| 
 | 
 4  | 
 0  | 
     XPUSHs( sv_2mortal( details_3 ? newSVpv( details_3, 0 ) : &PL_sv_undef ) );  | 
 
| 
2382
 | 
 0  | 
 4  | 
     XPUSHs( sv_2mortal( details_4 ? newSVpv( details_4, 0 ) : &PL_sv_undef ) );  | 
 
| 
 | 
 0  | 
 4  | 
     XPUSHs( sv_2mortal( details_4 ? newSVpv( details_4, 0 ) : &PL_sv_undef ) );  | 
 
| 
2387
 | 
 0  | 
 4  | 
     if ( n_retval != 1 ) {  | 
 
| 
2390
 | 
 4  | 
 4  | 
     for(i = 0; i < n_retval; i++) {  | 
 
| 
2391
 | 
 4  | 
 0  | 
         retval = POPi;  | 
 
| 
2395
 | 
 4  | 
 0  | 
     FREETMPS;  | 
 
| 
2407
 | 
 4  | 
 4  | 
     if (!DBIc_ACTIVE(imp_dbh)) {  | 
 
| 
2414
 | 
 2  | 
 2  | 
     if (!SvOK(authorizer)) {  | 
 
| 
 | 
 2  | 
 0  | 
     if (!SvOK(authorizer)) {  | 
 
| 
 | 
 2  | 
 0  | 
     if (!SvOK(authorizer)) {  | 
 
| 
2444
 | 
 0  | 
 14  | 
     PUSHMARK(SP);  | 
 
| 
2445
 | 
 0  | 
 14  | 
     XPUSHs( sv_2mortal( newSVpv( sql, 0 ) ) );  | 
 
| 
2450
 | 
 0  | 
 14  | 
     if ( n_retval != 1 ) {  | 
 
| 
2453
 | 
 14  | 
 14  | 
     for(i = 0; i < n_retval; i++) {  | 
 
| 
2454
 | 
 14  | 
 0  | 
         retval = POPi;  | 
 
| 
2457
 | 
 14  | 
 0  | 
     FREETMPS;  | 
 
| 
2466
 | 
 0  | 
 6  | 
     if (!DBIc_ACTIVE(imp_dbh)) {  | 
 
| 
2473
 | 
 2  | 
 4  | 
     if (!SvOK(func)) {  | 
 
| 
 | 
 2  | 
 0  | 
     if (!SvOK(func)) {  | 
 
| 
 | 
 2  | 
 0  | 
     if (!SvOK(func)) {  | 
 
| 
2502
 | 
 0  | 
 6  | 
     PUSHMARK(SP);  | 
 
| 
2503
 | 
 0  | 
 6  | 
     XPUSHs( sv_2mortal( newSVpv( sql, 0 ) ) );  | 
 
| 
2511
 | 
 0  | 
 6  | 
     XPUSHs( sv_2mortal( newSViv((IV)( elapsed / 1000000 )) ) );  | 
 
| 
2516
 | 
 0  | 
 6  | 
     if ( n_retval != 1 ) {  | 
 
| 
2519
 | 
 6  | 
 6  | 
     for(i = 0; i < n_retval; i++) {  | 
 
| 
2520
 | 
 6  | 
 0  | 
         retval = POPi;  | 
 
| 
2523
 | 
 6  | 
 0  | 
     FREETMPS;  | 
 
| 
2532
 | 
 0  | 
 6  | 
     if (!DBIc_ACTIVE(imp_dbh)) {  | 
 
| 
2539
 | 
 2  | 
 4  | 
     if (!SvOK(func)) {  | 
 
| 
 | 
 2  | 
 0  | 
     if (!SvOK(func)) {  | 
 
| 
 | 
 2  | 
 0  | 
     if (!SvOK(func)) {  | 
 
| 
2572
 | 
 4  | 
 2  | 
     if (!DBIc_ACTIVE(imp_dbh)) {  | 
 
| 
2580
 | 
 0  | 
 2  | 
     if ( rc != SQLITE_OK ) {  | 
 
| 
2586
 | 
 2  | 
 0  | 
     if (pBackup) {  | 
 
| 
2593
 | 
 0  | 
 2  | 
     if ( rc != SQLITE_OK ) {  | 
 
| 
2620
 | 
 4  | 
 2  | 
     if (!DBIc_ACTIVE(imp_dbh)) {  | 
 
| 
2628
 | 
 0  | 
 2  | 
     if ( rc != SQLITE_OK ) {  | 
 
| 
2634
 | 
 2  | 
 0  | 
     if (pBackup) {  | 
 
| 
2641
 | 
 0  | 
 2  | 
     if ( rc != SQLITE_OK ) {  |