]> granicus.if.org Git - php/commitdiff
MFB: Re-introduce the Matteo's patch and combine default & text handling
authorIlia Alshanetsky <iliaa@php.net>
Wed, 20 May 2009 15:05:36 +0000 (15:05 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Wed, 20 May 2009 15:05:36 +0000 (15:05 +0000)
since they appear to be the same irregardless on notes inside sqlite3.h

ext/pdo_sqlite/sqlite_statement.c

index 2d32a0bf1f16fca9066880be6b695f0c31863ae3..2adf2f6a5879ee827d576e0d1be7a202903af6ce 100644 (file)
@@ -262,16 +262,6 @@ static int pdo_sqlite_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr, unsi
                        *len = sqlite3_column_bytes(S->stmt, colno);
                        return 1;
 
-               case SQLITE3_TEXT:
-                       *ptr = (char*)sqlite3_column_text(S->stmt, colno);
-                       *len = sqlite3_column_bytes(S->stmt, colno);
-#if SQLITE_VERSION_NUMBER < 3004000
-                       if (*len) {
-                               /* sqlite3.h says "the NUL terminator is included in the byte count for TEXT values" */
-                               (*len)--;
-                       }
-#endif
-                       return 1;
                default:
                        *ptr = (char*)sqlite3_column_text(S->stmt, colno);
                        *len = sqlite3_column_bytes(S->stmt, colno);