diff options
| author | Ondřej Surý <ondrej@sury.org> | 2010-03-09 11:57:54 +0100 |
|---|---|---|
| committer | Ondřej Surý <ondrej@sury.org> | 2010-03-09 11:57:54 +0100 |
| commit | 855a09f4eded707941180c9d90acd17c25e29447 (patch) | |
| tree | a40947efaa9876f31b6ee3956c3f3775768143bb /ext/odbc | |
| parent | c852c28a88fccf6e34a2cb091fdfa72bce2b59c7 (diff) | |
| download | php-upstream/5.3.2.tar.gz | |
Imported Upstream version 5.3.2upstream/5.3.2
Diffstat (limited to 'ext/odbc')
| -rw-r--r-- | ext/odbc/birdstep.c | 4 | ||||
| -rw-r--r-- | ext/odbc/php_birdstep.h | 4 | ||||
| -rw-r--r-- | ext/odbc/php_odbc.c | 24 | ||||
| -rw-r--r-- | ext/odbc/php_odbc.h | 4 | ||||
| -rw-r--r-- | ext/odbc/php_odbc_includes.h | 4 |
5 files changed, 16 insertions, 24 deletions
diff --git a/ext/odbc/birdstep.c b/ext/odbc/birdstep.c index 6f778a72c..3f04d2118 100644 --- a/ext/odbc/birdstep.c +++ b/ext/odbc/birdstep.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2009 The PHP Group | + | Copyright (c) 1997-2010 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: birdstep.c 281742 2009-06-06 02:40:49Z mattwil $ */ +/* $Id: birdstep.c 293036 2010-01-03 09:23:27Z sebastian $ */ /* * TODO: diff --git a/ext/odbc/php_birdstep.h b/ext/odbc/php_birdstep.h index 791cfb1b4..778e399b1 100644 --- a/ext/odbc/php_birdstep.h +++ b/ext/odbc/php_birdstep.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2009 The PHP Group | + | Copyright (c) 1997-2010 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_birdstep.h 272370 2008-12-31 11:15:49Z sebastian $ */ +/* $Id: php_birdstep.h 293036 2010-01-03 09:23:27Z sebastian $ */ #ifndef PHP_BIRDSTEP_H #define PHP_BIRDSTEP_H diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c index 4d74b29c7..631b10ec5 100644 --- a/ext/odbc/php_odbc.c +++ b/ext/odbc/php_odbc.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2009 The PHP Group | + | Copyright (c) 1997-2010 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_odbc.c 280531 2009-05-14 17:24:42Z felipe $ */ +/* $Id: php_odbc.c 293036 2010-01-03 09:23:27Z sebastian $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -981,6 +981,10 @@ int odbc_bindcols(odbc_result *result TSRMLS_DC) NULL, 0, NULL, &displaysize); displaysize = displaysize <= result->longreadlen ? displaysize : result->longreadlen; + /* Workaround for Oracle ODBC Driver bug (#50162) when fetching TIMESTAMP column */ + if (result->values[i].coltype == SQL_TIMESTAMP) { + displaysize += 3; + } result->values[i].value = (char *)emalloc(displaysize + 1); rc = SQLBindCol(result->stmt, (SQLUSMALLINT)(i+1), SQL_C_CHAR, result->values[i].value, displaysize + 1, &result->values[i].vallen); @@ -1176,13 +1180,7 @@ PHP_FUNCTION(odbc_prepare) /* Try to set CURSOR_TYPE to dynamic. Driver will replace this with other type if not possible. */ - int cursortype = ODBCG(default_cursortype); - if (SQLSetStmtOption(result->stmt, SQL_CURSOR_TYPE, cursortype) == SQL_ERROR) { - odbc_sql_error(conn, result->stmt, " SQLSetStmtOption"); - SQLFreeStmt(result->stmt, SQL_DROP); - efree(result); - RETURN_FALSE; - } + SQLSetStmtOption(result->stmt, SQL_CURSOR_TYPE, ODBCG(default_cursortype)); } } else { result->fetch_abs = 0; @@ -1572,13 +1570,7 @@ PHP_FUNCTION(odbc_exec) /* Try to set CURSOR_TYPE to dynamic. Driver will replace this with other type if not possible. */ - int cursortype = ODBCG(default_cursortype); - if (SQLSetStmtOption(result->stmt, SQL_CURSOR_TYPE, cursortype) == SQL_ERROR) { - odbc_sql_error(conn, result->stmt, " SQLSetStmtOption"); - SQLFreeStmt(result->stmt, SQL_DROP); - efree(result); - RETURN_FALSE; - } + SQLSetStmtOption(result->stmt, SQL_CURSOR_TYPE, ODBCG(default_cursortype)); } } else { result->fetch_abs = 0; diff --git a/ext/odbc/php_odbc.h b/ext/odbc/php_odbc.h index e2157569a..9045d754b 100644 --- a/ext/odbc/php_odbc.h +++ b/ext/odbc/php_odbc.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2009 The PHP Group | + | Copyright (c) 1997-2010 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_odbc.h 272370 2008-12-31 11:15:49Z sebastian $ */ +/* $Id: php_odbc.h 293036 2010-01-03 09:23:27Z sebastian $ */ #ifndef PHP_ODBC_H #define PHP_ODBC_H diff --git a/ext/odbc/php_odbc_includes.h b/ext/odbc/php_odbc_includes.h index fce92f12c..fd87efea5 100644 --- a/ext/odbc/php_odbc_includes.h +++ b/ext/odbc/php_odbc_includes.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2009 The PHP Group | + | Copyright (c) 1997-2010 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_odbc_includes.h 272370 2008-12-31 11:15:49Z sebastian $ */ +/* $Id: php_odbc_includes.h 293036 2010-01-03 09:23:27Z sebastian $ */ #ifndef PHP_ODBC_INCLUDES_H #define PHP_ODBC_INCLUDES_H |
