line |
true |
false |
branch |
10
|
109 |
0 |
DBISTATE_DECLARE; |
|
0 |
109 |
DBISTATE_DECLARE; |
55
|
0 |
2085 |
((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 |
1194 |
(sql[0] == 'S' || sql[0] == 's') && |
|
878 |
13 |
(sql[0] == 'S' || sql[0] == 's') && |
62
|
0 |
878 |
(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
|
2085 |
23 |
) ? TRUE : FALSE; |
|
1272 |
813 |
) ? 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
|
1107 |
218 |
while(zNum < zEnd && _isspace(*zNum)) zNum++; |
|
1 |
1106 |
while(zNum < zEnd && _isspace(*zNum)) zNum++; |
|
0 |
1106 |
while(zNum < zEnd && _isspace(*zNum)) zNum++; |
|
0 |
1106 |
while(zNum < zEnd && _isspace(*zNum)) zNum++; |
|
0 |
1106 |
while(zNum < zEnd && _isspace(*zNum)) zNum++; |
|
0 |
1106 |
while(zNum < zEnd && _isspace(*zNum)) zNum++; |
|
0 |
1106 |
while(zNum < zEnd && _isspace(*zNum)) zNum++; |
101
|
1106 |
218 |
if (zNum < zEnd) { |
102
|
188 |
918 |
if (*zNum == '-') { |
105
|
0 |
918 |
} else if (*zNum == '+') { |
110
|
1141 |
280 |
while(zNum < zEnd && zNum[0] == '0') zNum++; |
|
97 |
1044 |
while(zNum < zEnd && zNum[0] == '0') zNum++; |
111
|
5714 |
922 |
for(i = 0; &zNum[i] < zEnd && (c = zNum[i]) >= '0' && c <= '9'; i++) { |
|
5674 |
40 |
for(i = 0; &zNum[i] < zEnd && (c = zNum[i]) >= '0' && c <= '9'; i++) { |
|
5312 |
362 |
for(i = 0; &zNum[i] < zEnd && (c = zNum[i]) >= '0' && c <= '9'; i++) { |
114
|
12 |
1312 |
if (u > LARGEST_INT64) { |
115
|
12 |
0 |
*pNum = neg ? SMALLEST_INT64 : LARGEST_INT64; |
116
|
176 |
1136 |
} else if (neg) { |
121
|
1044 |
280 |
if ((c != 0 && &zNum[i] < zEnd) || (i == 0 && zStart == zNum) || i > 19) { |
|
642 |
402 |
if ((c != 0 && &zNum[i] < zEnd) || (i == 0 && zStart == zNum) || i > 19) { |
|
280 |
642 |
if ((c != 0 && &zNum[i] < zEnd) || (i == 0 && zStart == zNum) || i > 19) { |
|
62 |
218 |
if ((c != 0 && &zNum[i] < zEnd) || (i == 0 && zStart == zNum) || i > 19) { |
|
0 |
704 |
if ((c != 0 && &zNum[i] < zEnd) || (i == 0 && zStart == zNum) || i > 19) { |
123
|
536 |
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 |
2919 |
if ( rc != SQLITE_OK ) { |
171
|
39 |
0 |
if (errmsg) sqlite3_free(errmsg); |
180
|
20 |
248 |
if (flags) { |
185
|
6 |
262 |
if ( rc != SQLITE_OK ) { |
187
|
0 |
6 |
if (extended) |
191
|
6 |
0 |
if (*db) sqlite3_close(*db); |
267
|
336 |
427 |
if (is_unicode) { |
291
|
6 |
1047 |
if ( is_error ) { |
292
|
6 |
0 |
s = SvPV(result, len); |
298
|
151 |
896 |
if ( !SvOK(result) ) { |
|
151 |
0 |
if ( !SvOK(result) ) { |
|
151 |
0 |
if ( !SvOK(result) ) { |
300
|
0 |
896 |
} else if( SvIOK_UV(result) ) { |
302
|
0 |
0 |
sqlite3_result_int64( context, (sqlite3_int64)SvUV(result)); |
307
|
666 |
230 |
} else if ( !_sqlite_atoi64(SvPV(result, len), &iv) ) { |
|
276 |
620 |
} else if ( !_sqlite_atoi64(SvPV(result, len), &iv) ) { |
309
|
218 |
402 |
} else if ( SvNOK(result) && ( sizeof(NV) == sizeof(double) || SvNVX(result) == (double) SvNVX(result) ) ) { |
310
|
218 |
0 |
sqlite3_result_double( context, SvNV(result)); |
312
|
402 |
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 |
109 |
DBISTATE_INIT; /* Initialize the DBI macros */ |
408
|
0 |
264 |
sqlite_trace(dbh, imp_dbh, 3, form("login '%s' (version %s)", dbname, sqlite3_version)); |
410
|
264 |
0 |
if (SvROK(attr)) { |
412
|
0 |
264 |
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 |
263 |
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 |
245 |
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 |
230 |
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 |
230 |
} 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 |
258 |
if ( rc != SQLITE_OK ) { |
482
|
258 |
0 |
DBIc_ACTIVE_on(imp_dbh); |
|
258 |
0 |
DBIc_ACTIVE_on(imp_dbh); |
|
258 |
0 |
DBIc_ACTIVE_on(imp_dbh); |
|
0 |
258 |
DBIc_ACTIVE_on(imp_dbh); |
495
|
0 |
2782 |
if (!DBIc_ACTIVE(imp_dbh)) { |
501
|
106 |
2676 |
if (imp_dbh->unicode) { |
505
|
2782 |
0 |
statement = SvPV_nolen(sv_statement); |
507
|
0 |
2782 |
sqlite_trace(dbh, imp_dbh, 3, form("do statement: %s", statement)); |
511
|
544 |
2238 |
if (sqlite3_get_autocommit(imp_dbh->db)) { |
513
|
8 |
18 |
_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); |
|
59 |
28 |
_skip_whitespaces(sql); |
|
0 |
28 |
_skip_whitespaces(sql); |
|
5 |
23 |
_skip_whitespaces(sql); |
|
0 |
23 |
_skip_whitespaces(sql); |
|
0 |
23 |
_skip_whitespaces(sql); |
|
0 |
23 |
_skip_whitespaces(sql); |
|
3 |
0 |
_skip_whitespaces(sql); |
|
57 |
1 |
_skip_whitespaces(sql); |
|
55 |
2 |
_skip_whitespaces(sql); |
|
18 |
552 |
_skip_whitespaces(sql); |
|
0 |
552 |
_skip_whitespaces(sql); |
|
5 |
547 |
_skip_whitespaces(sql); |
|
0 |
547 |
_skip_whitespaces(sql); |
|
0 |
547 |
_skip_whitespaces(sql); |
|
0 |
547 |
_skip_whitespaces(sql); |
|
3 |
544 |
_skip_whitespaces(sql); |
|
3 |
0 |
_skip_whitespaces(sql); |
514
|
30 |
514 |
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 |
444 |
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 |
2749 |
if (rc != SQLITE_OK) { |
542
|
2236 |
513 |
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 |
232 |
if (DBIc_is(imp_dbh, DBIcf_AutoCommit) == FALSE) { |
634
|
256 |
0 |
DBIc_ACTIVE_off(imp_dbh); |
|
256 |
0 |
DBIc_ACTIVE_off(imp_dbh); |
|
255 |
1 |
DBIc_ACTIVE_off(imp_dbh); |
|
255 |
0 |
DBIc_ACTIVE_off(imp_dbh); |
|
0 |
255 |
DBIc_ACTIVE_off(imp_dbh); |
638
|
0 |
256 |
sqlite_trace( dbh, imp_dbh, 1, "Closing DB" ); |
640
|
0 |
256 |
sqlite_trace( dbh, imp_dbh, 1, form("rc = %d", rc) ); |
641
|
11 |
245 |
if ( SQLITE_BUSY == rc ) { /* We have unfinalized statements */ |
643
|
11 |
11 |
while ( (s = imp_dbh->stmt_list) ) { |
644
|
0 |
11 |
sqlite_trace( dbh, imp_dbh, 1, form("Finalizing statement (%p)", s->stmt) ); |
650
|
0 |
11 |
sqlite_trace( dbh, imp_dbh, 1, "Trying to close DB again" ); |
653
|
0 |
256 |
if ( SQLITE_OK != rc ) { |
658
|
4 |
256 |
while( (s = imp_dbh->stmt_list) ) { |
683
|
0 |
258 |
if (DBIc_ACTIVE(imp_dbh)) { |
694
|
1384 |
0 |
char *key = SvPV_nolen(keysv); |
699
|
333 |
1051 |
if (strEQ(key, "AutoCommit")) { |
700
|
333 |
0 |
if (SvTRUE(valuesv)) { |
|
0 |
333 |
if (SvTRUE(valuesv)) { |
|
2 |
331 |
if (SvTRUE(valuesv)) { |
|
2 |
0 |
if (SvTRUE(valuesv)) { |
|
0 |
2 |
if (SvTRUE(valuesv)) { |
|
4 |
327 |
if (SvTRUE(valuesv)) { |
|
4 |
0 |
if (SvTRUE(valuesv)) { |
|
4 |
0 |
if (SvTRUE(valuesv)) { |
|
1 |
3 |
if (SvTRUE(valuesv)) { |
|
1 |
0 |
if (SvTRUE(valuesv)) { |
|
327 |
0 |
if (SvTRUE(valuesv)) { |
|
327 |
0 |
if (SvTRUE(valuesv)) { |
|
75 |
252 |
if (SvTRUE(valuesv)) { |
|
0 |
75 |
if (SvTRUE(valuesv)) { |
|
0 |
0 |
if (SvTRUE(valuesv)) { |
|
253 |
80 |
if (SvTRUE(valuesv)) { |
702
|
252 |
1 |
if ( DBIc_ACTIVE(imp_dbh) && (!DBIc_is(imp_dbh, DBIcf_AutoCommit)) && (!sqlite3_get_autocommit(imp_dbh->db)) ) { |
|
247 |
5 |
if ( DBIc_ACTIVE(imp_dbh) && (!DBIc_is(imp_dbh, DBIcf_AutoCommit)) && (!sqlite3_get_autocommit(imp_dbh->db)) ) { |
|
2 |
245 |
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
|
333 |
0 |
DBIc_set(imp_dbh, DBIcf_AutoCommit, SvTRUE(valuesv)); |
|
0 |
333 |
DBIc_set(imp_dbh, DBIcf_AutoCommit, SvTRUE(valuesv)); |
|
0 |
0 |
DBIc_set(imp_dbh, DBIcf_AutoCommit, SvTRUE(valuesv)); |
|
2 |
331 |
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 |
327 |
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)); |
|
327 |
0 |
DBIc_set(imp_dbh, DBIcf_AutoCommit, SvTRUE(valuesv)); |
|
327 |
0 |
DBIc_set(imp_dbh, DBIcf_AutoCommit, SvTRUE(valuesv)); |
|
75 |
252 |
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)); |
|
252 |
75 |
DBIc_set(imp_dbh, DBIcf_AutoCommit, SvTRUE(valuesv)); |
|
0 |
0 |
DBIc_set(imp_dbh, DBIcf_AutoCommit, SvTRUE(valuesv)); |
714
|
4 |
1047 |
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 |
1043 |
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 |
1042 |
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 |
1035 |
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 |
1035 |
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 |
1001 |
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 |
1001 |
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
|
3210 |
0 |
char *key = SvPV_nolen(keysv); |
767
|
3 |
3207 |
if (strEQ(key, "sqlite_version")) { |
770
|
2908 |
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 |
210 |
if (!DBIc_ACTIVE(imp_dbh)) { |
832
|
4 |
1281 |
if (!DBIc_ACTIVE(imp_dbh)) { |
838
|
134 |
1147 |
if (imp_dbh->unicode) { |
842
|
1281 |
0 |
statement = SvPV_nolen(sv_statement); |
851
|
0 |
1281 |
sqlite_trace(sth, imp_sth, 3, form("prepare statement: %s", statement)); |
861
|
6 |
1275 |
if (rc != SQLITE_OK) { |
863
|
0 |
6 |
if (imp_sth->stmt) { |
866
|
0 |
0 |
if (rc != SQLITE_OK) { |
872
|
20 |
1255 |
if (imp_dbh->allow_multiple_statements) { |
876
|
0 |
1255 |
if (imp_dbh->allow_multiple_statements) |
910
|
1 |
1626 |
if (!DBIc_ACTIVE(imp_dbh)) { |
915
|
4 |
1622 |
if (!imp_sth->stmt) return 0; |
921
|
0 |
1622 |
sqlite_trace(sth, imp_sth, 3, form("executing %s", sqlite3_sql(imp_sth->stmt))); |
923
|
4 |
1618 |
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
|
1063 |
1622 |
for (i = 0; i < num_params; i++) { |
935
|
1063 |
0 |
SV *value = pvalue ? *pvalue : &PL_sv_undef; |
936
|
232 |
831 |
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 |
1063 |
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
|
14 |
1049 |
if (!SvOK(value)) { |
|
14 |
0 |
if (!SvOK(value)) { |
|
14 |
0 |
if (!SvOK(value)) { |
941
|
0 |
14 |
sqlite_trace(sth, imp_sth, 5, "binding null"); |
944
|
12 |
1037 |
else if (sql_type == SQLITE_BLOB) { |
946
|
11 |
1 |
char * data = SvPVbyte(value, len); |
954
|
80 |
957 |
if (imp_dbh->unicode) { |
957
|
747 |
290 |
data = SvPV(value, len); |
969
|
818 |
219 |
if (sql_type == SQLITE_NULL && imp_dbh->see_if_its_a_number) { |
|
17 |
801 |
if (sql_type == SQLITE_NULL && imp_dbh->see_if_its_a_number) { |
972
|
813 |
207 |
else if (sql_type == SQLITE_INTEGER || sql_type == SQLITE_FLOAT) { |
|
0 |
813 |
else if (sql_type == SQLITE_INTEGER || sql_type == SQLITE_FLOAT) { |
976
|
214 |
823 |
if (numtype == 1 && !_sqlite_atoi64(data, &iv)) { |
|
214 |
0 |
if (numtype == 1 && !_sqlite_atoi64(data, &iv)) { |
979
|
2 |
821 |
else if (numtype == 2 && sql_type != SQLITE_INTEGER) { |
|
2 |
0 |
else if (numtype == 2 && sql_type != SQLITE_INTEGER) { |
983
|
817 |
4 |
if (sql_type == SQLITE_INTEGER || sql_type == SQLITE_FLOAT) { |
|
0 |
817 |
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 |
1063 |
if (rc != SQLITE_OK) { |
1006
|
1564 |
58 |
if (sqlite3_get_autocommit(imp_dbh->db)) { |
1009
|
9 |
25 |
_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); |
|
154 |
43 |
_skip_whitespaces(sql); |
|
0 |
43 |
_skip_whitespaces(sql); |
|
9 |
34 |
_skip_whitespaces(sql); |
|
0 |
34 |
_skip_whitespaces(sql); |
|
0 |
34 |
_skip_whitespaces(sql); |
|
0 |
34 |
_skip_whitespaces(sql); |
|
0 |
0 |
_skip_whitespaces(sql); |
|
0 |
0 |
_skip_whitespaces(sql); |
|
0 |
0 |
_skip_whitespaces(sql); |
|
25 |
1573 |
_skip_whitespaces(sql); |
|
0 |
1573 |
_skip_whitespaces(sql); |
|
9 |
1564 |
_skip_whitespaces(sql); |
|
0 |
1564 |
_skip_whitespaces(sql); |
|
0 |
1564 |
_skip_whitespaces(sql); |
|
0 |
1564 |
_skip_whitespaces(sql); |
|
0 |
1564 |
_skip_whitespaces(sql); |
|
0 |
0 |
_skip_whitespaces(sql); |
1010
|
6 |
1558 |
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 |
1538 |
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 |
1620 |
sqlite_trace(sth, imp_sth, 3, form("Execute returned %d cols", DBIc_NUM_FIELDS(imp_sth))); |
1035
|
542 |
1078 |
if (DBIc_NUM_FIELDS(imp_sth) == 0) { |
1036
|
8 |
534 |
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 |
500 |
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
|
1072 |
6 |
switch (imp_sth->retval) { |
1067
|
1068 |
4 |
DBIc_ACTIVE_on(imp_sth); |
|
1068 |
0 |
DBIc_ACTIVE_on(imp_sth); |
|
1068 |
0 |
DBIc_ACTIVE_on(imp_sth); |
|
0 |
1068 |
DBIc_ACTIVE_on(imp_sth); |
1068
|
0 |
1072 |
sqlite_trace(sth, imp_sth, 5, form("exec ok - %d rows, %d cols", imp_sth->nrow, DBIc_NUM_FIELDS(imp_sth))); |
1069
|
1040 |
32 |
if (DBIc_is(imp_dbh, DBIcf_AutoCommit) && !sqlite3_get_autocommit(imp_dbh->db)) { |
|
0 |
1040 |
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 |
2499 |
if (!DBIc_ACTIVE(imp_dbh)) { |
1108
|
0 |
2499 |
sqlite_trace(sth, imp_sth, 6, form("numFields == %d, nrow == %d", numFields, imp_sth->nrow)); |
1110
|
2 |
2497 |
if (!DBIc_ACTIVE(imp_sth)) { |
1114
|
723 |
1774 |
if (imp_sth->retval == SQLITE_DONE) { |
1119
|
0 |
1774 |
if (imp_sth->retval != SQLITE_ROW) { |
1129
|
3588 |
1774 |
for (i = 0; i < numFields; i++) { |
1134
|
1274 |
2314 |
if (sql_type && SvOK(*sql_type)) { |
|
0 |
1274 |
if (sql_type && SvOK(*sql_type)) { |
|
0 |
0 |
if (sql_type && SvOK(*sql_type)) { |
|
0 |
0 |
if (sql_type && SvOK(*sql_type)) { |
1135
|
1274 |
0 |
if (SvIV(*sql_type)) { |
|
12 |
1262 |
if (SvIV(*sql_type)) { |
1136
|
12 |
0 |
col_type = sqlite_type_from_odbc_type(SvIV(*sql_type)); |
1141
|
0 |
1350 |
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 |
1928 |
sqlite_trace(sth, imp_sth, 5, form("fetch column %d as text", i)); |
1162
|
3 |
1925 |
if (chopBlanks) { |
1163
|
4 |
1 |
while((len > 0) && (val[len-1] == ' ')) { |
|
2 |
2 |
while((len > 0) && (val[len-1] == ' ')) { |
1168
|
323 |
1605 |
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 |
280 |
sqlite_trace(sth, imp_sth, 5, form("fetch column %d as default", i)); |
1187
|
0 |
3588 |
SvSETMAGIC(AvARRAY(av)[i]); |
1206
|
4 |
1067 |
if (!DBIc_ACTIVE(imp_sth)) |
1209
|
1067 |
0 |
DBIc_ACTIVE_off(imp_sth); |
|
1067 |
0 |
DBIc_ACTIVE_off(imp_sth); |
|
1067 |
0 |
DBIc_ACTIVE_off(imp_sth); |
|
1067 |
0 |
DBIc_ACTIVE_off(imp_sth); |
|
0 |
1067 |
DBIc_ACTIVE_off(imp_sth); |
1213
|
0 |
1067 |
if (!DBIc_ACTIVE(imp_dbh)) /* no longer connected */ |
1216
|
106 |
961 |
if (is_destroy) { |
1220
|
0 |
961 |
if ((imp_sth->retval = sqlite3_reset(imp_sth->stmt)) != SQLITE_OK) { |
1244
|
0 |
1275 |
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
|
1264 |
11 |
if (DBIc_ACTIVE(imp_dbh)) { |
1246
|
1260 |
4 |
if (imp_sth->stmt) { |
1248
|
0 |
1260 |
sqlite_trace(sth, imp_sth, 4, form("destroy statement: %s", sqlite3_sql(imp_sth->stmt))); |
1254
|
0 |
1260 |
sqlite_trace( sth, imp_sth, 1, form("Finalizing statement: %p", imp_sth->stmt) ); |
1256
|
0 |
1260 |
if (rc != SQLITE_OK) { |
1263
|
1286 |
0 |
while( i ) { |
1264
|
1260 |
26 |
if ( i->stmt == imp_sth->stmt ) { |
1265
|
26 |
1234 |
if ( temp != i ) temp->prev = i->prev; |
1266
|
1234 |
26 |
if ( i == imp_dbh->stmt_list ) imp_dbh->stmt_list = i->prev; |
1267
|
0 |
1260 |
sqlite_trace( sth, imp_sth, 1, form("Removing statement from list: %p", imp_sth->stmt) ); |
1279
|
20 |
1255 |
if (imp_dbh->allow_multiple_statements) |
1306
|
940 |
0 |
char *key = SvPV_nolen(keysv); |
1313
|
1 |
939 |
if (!DBIc_ACTIVE(imp_dbh)) { |
1318
|
16 |
923 |
if (strEQ(key, "sqlite_unprepared_statements")) { |
1330
|
517 |
406 |
if (strEQ(key, "NAME")) { |
1335
|
2159 |
517 |
for (n = 0; n < i; n++) { |
1338
|
2159 |
0 |
if (fieldname) { |
1344
|
216 |
1943 |
if (imp_dbh->unicode) |
1350
|
0 |
406 |
else if (strEQ(key, "PRECISION")) { |
1354
|
2 |
404 |
else if (strEQ(key, "TYPE")) { |
1358
|
6 |
2 |
for (n = 0; n < i; n++) { |
1364
|
6 |
0 |
if (fieldtype) |
1370
|
1 |
403 |
else if (strEQ(key, "NULLABLE")) { |
1375
|
4 |
1 |
for (n = 0; n < i; n++) { |
1382
|
0 |
4 |
if (rc != SQLITE_OK) { |
1392
|
0 |
403 |
else if (strEQ(key, "SCALE")) { |
1396
|
77 |
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 |
1071 |
if (is_inout) { |
1440
|
7 |
1064 |
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
|
1064 |
0 |
pos = 2 * (SvIV(param) - 1); |
1460
|
0 |
1070 |
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 |
905 |
if (sql_type) { |
1475
|
401 |
0 |
av_store(imp_sth->col_types, SvIV(col)-1, newSViv(sql_type)); |
1495
|
150 |
15 |
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 |
532 |
PUSHMARK(SP); |
1650
|
954 |
532 |
for ( i=0; i < argc; i++ ) { |
1651
|
0 |
954 |
XPUSHs(stacked_sv_from_sqlite3_value(aTHX_ value[i], is_unicode)); |
1660
|
532 |
0 |
if (SvTRUE(ERRSV) ) { |
|
532 |
0 |
if (SvTRUE(ERRSV) ) { |
|
532 |
0 |
if (SvTRUE(ERRSV) ) { |
|
0 |
532 |
if (SvTRUE(ERRSV) ) { |
|
0 |
0 |
if (SvTRUE(ERRSV) ) { |
|
0 |
0 |
if (SvTRUE(ERRSV) ) { |
|
532 |
0 |
if (SvTRUE(ERRSV) ) { |
|
0 |
532 |
if (SvTRUE(ERRSV) ) { |
|
0 |
0 |
if (SvTRUE(ERRSV) ) { |
|
0 |
0 |
if (SvTRUE(ERRSV) ) { |
|
0 |
0 |
if (SvTRUE(ERRSV) ) { |
|
0 |
0 |
if (SvTRUE(ERRSV) ) { |
|
532 |
0 |
if (SvTRUE(ERRSV) ) { |
|
532 |
0 |
if (SvTRUE(ERRSV) ) { |
|
532 |
0 |
if (SvTRUE(ERRSV) ) { |
|
532 |
0 |
if (SvTRUE(ERRSV) ) { |
|
532 |
0 |
if (SvTRUE(ERRSV) ) { |
|
526 |
6 |
if (SvTRUE(ERRSV) ) { |
|
526 |
0 |
if (SvTRUE(ERRSV) ) { |
|
0 |
526 |
if (SvTRUE(ERRSV) ) { |
|
0 |
0 |
if (SvTRUE(ERRSV) ) { |
|
0 |
0 |
if (SvTRUE(ERRSV) ) { |
|
6 |
526 |
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 |
526 |
} else if ( count != 1 ) { |
1669
|
0 |
0 |
for ( i=0; i < count; i++ ) { |
1677
|
532 |
0 |
FREETMPS; |
1700
|
4 |
314 |
if (!DBIc_ACTIVE(imp_dbh)) { |
1712
|
27 |
287 |
rc = sqlite3_create_function( imp_dbh->db, name, argc, SQLITE_UTF8|flags, |
1717
|
0 |
314 |
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 |
258 |
if (!DBIc_ACTIVE(imp_dbh)) { |
2173
|
0 |
258 |
(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 ) { |