From 6ede09aa836c53630ec18e67d3441786b3fcc938 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Wed, 6 Oct 2010 15:31:49 +0000 Subject: [PATCH] MDL-24551 importing latest adodb 5.11 --- lib/adodb/adodb-active-record.inc.php | 26 ++++-- lib/adodb/adodb-active-recordx.inc.php | 2 +- lib/adodb/adodb-csvlib.inc.php | 2 +- lib/adodb/adodb-datadict.inc.php | 28 +++++- lib/adodb/adodb-error.inc.php | 4 +- lib/adodb/adodb-errorhandler.inc.php | 2 +- lib/adodb/adodb-errorpear.inc.php | 2 +- lib/adodb/adodb-exceptions.inc.php | 2 +- lib/adodb/adodb-iterator.inc.php | 2 +- lib/adodb/adodb-lib.inc.php | 12 ++- lib/adodb/adodb-memcache.lib.inc.php | 2 +- lib/adodb/adodb-pager.inc.php | 2 +- lib/adodb/adodb-pear.inc.php | 2 +- lib/adodb/adodb-perf.inc.php | 2 +- lib/adodb/adodb-php4.inc.php | 2 +- lib/adodb/adodb-time.inc.php | 3 + lib/adodb/adodb-xmlschema.inc.php | 10 ++- lib/adodb/adodb-xmlschema03.inc.php | 10 ++- lib/adodb/adodb.inc.php | 39 +++++--- lib/adodb/datadict/datadict-access.inc.php | 2 +- lib/adodb/datadict/datadict-db2.inc.php | 2 +- lib/adodb/datadict/datadict-firebird.inc.php | 2 +- lib/adodb/datadict/datadict-generic.inc.php | 2 +- lib/adodb/datadict/datadict-ibase.inc.php | 2 +- lib/adodb/datadict/datadict-informix.inc.php | 2 +- lib/adodb/datadict/datadict-mssql.inc.php | 2 +- .../datadict/datadict-mssqlnative.inc.php | 2 +- lib/adodb/datadict/datadict-mysql.inc.php | 2 +- lib/adodb/datadict/datadict-oci8.inc.php | 2 +- lib/adodb/datadict/datadict-postgres.inc.php | 2 +- lib/adodb/datadict/datadict-sapdb.inc.php | 2 +- lib/adodb/datadict/datadict-sqlite.inc.php | 89 +++++++++++++++++++ lib/adodb/datadict/datadict-sybase.inc.php | 2 +- lib/adodb/drivers/adodb-access.inc.php | 2 +- lib/adodb/drivers/adodb-ado.inc.php | 2 +- lib/adodb/drivers/adodb-ado5.inc.php | 4 +- lib/adodb/drivers/adodb-ado_access.inc.php | 2 +- lib/adodb/drivers/adodb-ado_mssql.inc.php | 2 +- lib/adodb/drivers/adodb-borland_ibase.inc.php | 2 +- lib/adodb/drivers/adodb-csv.inc.php | 2 +- lib/adodb/drivers/adodb-db2.inc.php | 34 +++---- lib/adodb/drivers/adodb-db2oci.inc.php | 2 +- lib/adodb/drivers/adodb-db2ora.inc.php | 80 +++++++++++++++++ lib/adodb/drivers/adodb-fbsql.inc.php | 2 +- lib/adodb/drivers/adodb-firebird.inc.php | 2 +- lib/adodb/drivers/adodb-ibase.inc.php | 2 +- lib/adodb/drivers/adodb-informix.inc.php | 2 +- lib/adodb/drivers/adodb-informix72.inc.php | 4 +- lib/adodb/drivers/adodb-ldap.inc.php | 2 +- lib/adodb/drivers/adodb-mssql.inc.php | 33 +++++-- lib/adodb/drivers/adodb-mssql_n.inc.php | 2 +- lib/adodb/drivers/adodb-mssqlnative.inc.php | 7 +- lib/adodb/drivers/adodb-mssqlpo.inc.php | 2 +- lib/adodb/drivers/adodb-mysql.inc.php | 5 +- lib/adodb/drivers/adodb-mysqli.inc.php | 6 +- lib/adodb/drivers/adodb-mysqlpo.inc.php | 4 +- lib/adodb/drivers/adodb-mysqlt.inc.php | 4 +- lib/adodb/drivers/adodb-netezza.inc.php | 2 +- lib/adodb/drivers/adodb-oci8.inc.php | 26 ++++-- lib/adodb/drivers/adodb-oci805.inc.php | 2 +- lib/adodb/drivers/adodb-oci8po.inc.php | 2 +- lib/adodb/drivers/adodb-odbc.inc.php | 8 +- lib/adodb/drivers/adodb-odbc_db2.inc.php | 4 +- lib/adodb/drivers/adodb-odbc_mssql.inc.php | 3 +- lib/adodb/drivers/adodb-odbc_oracle.inc.php | 2 +- lib/adodb/drivers/adodb-odbtp.inc.php | 9 +- lib/adodb/drivers/adodb-odbtp_unicode.inc.php | 2 +- lib/adodb/drivers/adodb-oracle.inc.php | 2 +- lib/adodb/drivers/adodb-pdo.inc.php | 2 +- lib/adodb/drivers/adodb-pdo_mssql.inc.php | 2 +- lib/adodb/drivers/adodb-pdo_mysql.inc.php | 2 +- lib/adodb/drivers/adodb-pdo_oci.inc.php | 2 +- lib/adodb/drivers/adodb-pdo_pgsql.inc.php | 2 +- lib/adodb/drivers/adodb-pdo_sqlite.inc.php | 2 +- lib/adodb/drivers/adodb-postgres.inc.php | 2 +- lib/adodb/drivers/adodb-postgres64.inc.php | 6 +- lib/adodb/drivers/adodb-postgres7.inc.php | 2 +- lib/adodb/drivers/adodb-postgres8.inc.php | 2 +- lib/adodb/drivers/adodb-proxy.inc.php | 2 +- lib/adodb/drivers/adodb-sapdb.inc.php | 4 +- lib/adodb/drivers/adodb-sqlanywhere.inc.php | 2 +- lib/adodb/drivers/adodb-sqlite.inc.php | 4 +- lib/adodb/drivers/adodb-sqlitepo.inc.php | 2 +- lib/adodb/drivers/adodb-sybase.inc.php | 2 +- lib/adodb/drivers/adodb-sybase_ase.inc.php | 2 +- lib/adodb/drivers/adodb-vfp.inc.php | 2 +- lib/adodb/lang/adodb-ar.inc.php | 33 ------- lib/adodb/lang/adodb-bg.inc.php | 37 -------- lib/adodb/lang/adodb-bgutf8.inc.php | 37 -------- lib/adodb/lang/adodb-ca.inc.php | 34 ------- lib/adodb/lang/adodb-cn.inc.php | 35 -------- lib/adodb/lang/adodb-cz.inc.php | 40 --------- lib/adodb/lang/adodb-da.inc.php | 33 ------- lib/adodb/lang/adodb-de.inc.php | 33 ------- lib/adodb/lang/adodb-es.inc.php | 33 ------- lib/adodb/lang/adodb-esperanto.inc.php | 35 -------- lib/adodb/lang/adodb-fa.inc.php | 35 -------- lib/adodb/lang/adodb-fr.inc.php | 33 ------- lib/adodb/lang/adodb-hu.inc.php | 34 ------- lib/adodb/lang/adodb-it.inc.php | 34 ------- lib/adodb/lang/adodb-nl.inc.php | 33 ------- lib/adodb/lang/adodb-pl.inc.php | 35 -------- lib/adodb/lang/adodb-pt-br.inc.php | 35 -------- lib/adodb/lang/adodb-ro.inc.php | 35 -------- lib/adodb/lang/adodb-ru1251.inc.php | 35 -------- lib/adodb/lang/adodb-sv.inc.php | 33 ------- lib/adodb/lang/adodb-uk1251.inc.php | 35 -------- lib/adodb/lang/adodb_th.inc.php | 33 ------- lib/adodb/perf/perf-db2.inc.php | 2 +- lib/adodb/perf/perf-informix.inc.php | 2 +- lib/adodb/perf/perf-mssql.inc.php | 2 +- lib/adodb/perf/perf-mssqlnative.inc.php | 2 +- lib/adodb/perf/perf-mysql.inc.php | 2 +- lib/adodb/perf/perf-oci8.inc.php | 80 +++++++++++++---- lib/adodb/perf/perf-postgres.inc.php | 2 +- lib/adodb/pivottable.inc.php | 2 +- lib/adodb/readme_moodle.txt | 5 +- lib/adodb/rsfilter.inc.php | 2 +- lib/adodb/toexport.inc.php | 2 +- lib/adodb/tohtml.inc.php | 2 +- 120 files changed, 499 insertions(+), 950 deletions(-) create mode 100644 lib/adodb/datadict/datadict-sqlite.inc.php create mode 100644 lib/adodb/drivers/adodb-db2ora.inc.php delete mode 100644 lib/adodb/lang/adodb-ar.inc.php delete mode 100644 lib/adodb/lang/adodb-bg.inc.php delete mode 100644 lib/adodb/lang/adodb-bgutf8.inc.php delete mode 100644 lib/adodb/lang/adodb-ca.inc.php delete mode 100644 lib/adodb/lang/adodb-cn.inc.php delete mode 100644 lib/adodb/lang/adodb-cz.inc.php delete mode 100644 lib/adodb/lang/adodb-da.inc.php delete mode 100644 lib/adodb/lang/adodb-de.inc.php delete mode 100644 lib/adodb/lang/adodb-es.inc.php delete mode 100644 lib/adodb/lang/adodb-esperanto.inc.php delete mode 100644 lib/adodb/lang/adodb-fa.inc.php delete mode 100644 lib/adodb/lang/adodb-fr.inc.php delete mode 100644 lib/adodb/lang/adodb-hu.inc.php delete mode 100644 lib/adodb/lang/adodb-it.inc.php delete mode 100644 lib/adodb/lang/adodb-nl.inc.php delete mode 100644 lib/adodb/lang/adodb-pl.inc.php delete mode 100644 lib/adodb/lang/adodb-pt-br.inc.php delete mode 100644 lib/adodb/lang/adodb-ro.inc.php delete mode 100644 lib/adodb/lang/adodb-ru1251.inc.php delete mode 100644 lib/adodb/lang/adodb-sv.inc.php delete mode 100644 lib/adodb/lang/adodb-uk1251.inc.php delete mode 100644 lib/adodb/lang/adodb_th.inc.php diff --git a/lib/adodb/adodb-active-record.inc.php b/lib/adodb/adodb-active-record.inc.php index 55a89bbb7c0b7..845c6568c9d72 100644 --- a/lib/adodb/adodb-active-record.inc.php +++ b/lib/adodb/adodb-active-record.inc.php @@ -1,7 +1,7 @@ _tableat; if (!$forceUpdate && !empty($tables[$tableat])) { - $tobj = $tables[$tableat]; - foreach($tobj->flds as $name => $fld) { + $acttab = $tables[$tableat]; + foreach($acttab->flds as $name => $fld) { if ($ADODB_ACTIVE_DEFVALS && isset($fld->default_value)) $this->$name = $fld->default_value; else @@ -364,6 +364,14 @@ function UpdateActiveTable($pkeys=false,$forceUpdate=false) if ($acttab->_created + $ADODB_ACTIVE_CACHESECS - (abs(rand()) % 16) > time()) { // abs(rand()) randomizes deletion, reducing contention to delete/refresh file // ideally, you should cache at least 32 secs + + foreach($acttab->flds as $name => $fld) { + if ($ADODB_ACTIVE_DEFVALS && isset($fld->default_value)) + $this->$name = $fld->default_value; + else + $this->$name = null; + } + $activedb->tables[$table] = $acttab; //if ($db->debug) ADOConnection::outp("Reading cached active record file: $fname"); @@ -621,11 +629,13 @@ function LastInsertID(&$db,$fieldname) function doquote(&$db, $val,$t) { switch($t) { - case 'D': + case 'L': + if (strpos($db->databaseType,'postgres') !== false) return $db->qstr($val); + case 'D': case 'T': if (empty($val)) return 'null'; - case 'B': + case 'B': case 'N': case 'C': case 'X': @@ -889,10 +899,10 @@ function Update() } } } - - if (isset($this->_original[$i]) && $val == $this->_original[$i]) { + + if (isset($this->_original[$i]) && strcmp($val,$this->_original[$i]) == 0) { continue; - } + } $valarr[] = $val; $pairs[] = $this->_QName($name,$db).'='.$db->Param($cnt); $cnt += 1; diff --git a/lib/adodb/adodb-active-recordx.inc.php b/lib/adodb/adodb-active-recordx.inc.php index 6d270b65457a7..9b526ad50487d 100644 --- a/lib/adodb/adodb-active-recordx.inc.php +++ b/lib/adodb/adodb-active-recordx.inc.php @@ -1,7 +1,7 @@ @@ -958,9 +975,16 @@ function ChangeTableSQL($tablename, $flds, $tableoptions = false, $dropOldFlds=f $c = $cols[$k]; $ml = $c->max_length; $mt = $this->MetaType($c->type,$ml); + + if (isset($c->scale)) $sc = $c->scale; + else $sc = 99; // always force change if scale not known. + + if ($sc == -1) $sc = false; + list($fsize, $fprec) = $this->_getSizePrec($v['SIZE']); + if ($ml == -1) $ml = ''; if ($mt == 'X') $ml = $v['SIZE']; - if (($mt != $v['TYPE']) || $ml != $v['SIZE'] || (isset($v['AUTOINCREMENT']) && $v['AUTOINCREMENT'] != $obj->auto_increment)) { + if (($mt != $v['TYPE']) || ($ml != $fsize || $sc != $fprec) || (isset($v['AUTOINCREMENT']) && $v['AUTOINCREMENT'] != $obj->auto_increment)) { $holdflds[$k] = $v; } } else { diff --git a/lib/adodb/adodb-error.inc.php b/lib/adodb/adodb-error.inc.php index ae0b9e3543da5..6ec614d2c19ae 100644 --- a/lib/adodb/adodb-error.inc.php +++ b/lib/adodb/adodb-error.inc.php @@ -1,6 +1,6 @@ DB_ERROR_NOSUCHFIELD, '/parser: parse error at or near \"/i' => DB_ERROR_SYNTAX, '/referential integrity violation/i' => DB_ERROR_CONSTRAINT, - '/Relation [\"\'].*[\"\'] already exists|Cannot insert a duplicate key into (a )?unique index.*|duplicate key violates unique constraint/i' + '/Relation [\"\'].*[\"\'] already exists|Cannot insert a duplicate key into (a )?unique index.*|duplicate key.*violates unique constraint/i' => DB_ERROR_ALREADY_EXISTS ); reset($error_regexps); diff --git a/lib/adodb/adodb-errorhandler.inc.php b/lib/adodb/adodb-errorhandler.inc.php index 3cf68a414c7f6..b76008911a89d 100644 --- a/lib/adodb/adodb-errorhandler.inc.php +++ b/lib/adodb/adodb-errorhandler.inc.php @@ -1,6 +1,6 @@ Execute($rewritesql,$inputarr); - if (!$rstest) $rstest = $zthis->Execute($sql,$inputarr); - + if ($secs2cache) { + $rstest = $zthis->CacheExecute($secs2cache,$rewritesql,$inputarr); + if (!$rstest) $rstest = $zthis->CacheExecute($secs2cache,$sql,$inputarr); + } else { + $rstest = $zthis->Execute($rewritesql,$inputarr); + if (!$rstest) $rstest = $zthis->Execute($sql,$inputarr); + } if ($rstest) { $qryRecs = $rstest->RecordCount(); if ($qryRecs == -1) { diff --git a/lib/adodb/adodb-memcache.lib.inc.php b/lib/adodb/adodb-memcache.lib.inc.php index dad4c38f9cb37..e666d56a4e477 100644 --- a/lib/adodb/adodb-memcache.lib.inc.php +++ b/lib/adodb/adodb-memcache.lib.inc.php @@ -11,7 +11,7 @@ /* - V5.06 16 Oct 2008 (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved. + V5.06 16 Oct 2008 (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, the BSD license will take precedence. See License.txt. diff --git a/lib/adodb/adodb-pager.inc.php b/lib/adodb/adodb-pager.inc.php index d6980c107db5c..b57ee95309b5b 100644 --- a/lib/adodb/adodb-pager.inc.php +++ b/lib/adodb/adodb-pager.inc.php @@ -1,7 +1,7 @@ mgq = get_magic_quotes_runtime(); - set_magic_quotes_runtime(0); + ini_set("magic_quotes_runtime", 0); + #set_magic_quotes_runtime(0); $this->db = $db; $this->debug = $this->db->debug; @@ -2193,7 +2194,8 @@ function getSQL( $format = NULL, $sqlArray = NULL ) { * @deprecated adoSchema now cleans up automatically. */ function Destroy() { - set_magic_quotes_runtime( $this->mgq ); + ini_set("magic_quotes_runtime", $this->mgq ); + #set_magic_quotes_runtime( $this->mgq ); unset( $this ); } } diff --git a/lib/adodb/adodb-xmlschema03.inc.php b/lib/adodb/adodb-xmlschema03.inc.php index f112f7b104c8d..f5c7192906bce 100644 --- a/lib/adodb/adodb-xmlschema03.inc.php +++ b/lib/adodb/adodb-xmlschema03.inc.php @@ -167,7 +167,7 @@ function _tag_close( &$parser, $tag ) { } - function create() { + function create(&$xmls) { return array(); } @@ -1405,10 +1405,11 @@ class adoSchema { * * @param object $db ADOdb database connection object. */ - function adoSchema( &$db ) { + function adoSchema( $db ) { // Initialize the environment $this->mgq = get_magic_quotes_runtime(); - set_magic_quotes_runtime(0); + #set_magic_quotes_runtime(0); + ini_set("magic_quotes_runtime", 0); $this->db = $db; $this->debug = $this->db->debug; @@ -2374,7 +2375,8 @@ function getSQL( $format = NULL, $sqlArray = NULL ) { * @deprecated adoSchema now cleans up automatically. */ function Destroy() { - set_magic_quotes_runtime( $this->mgq ); + ini_set("magic_quotes_runtime", $this->mgq ); + #set_magic_quotes_runtime( $this->mgq ); unset( $this ); } } diff --git a/lib/adodb/adodb.inc.php b/lib/adodb/adodb.inc.php index 9752d106f7c55..2da3777ddfa37 100644 --- a/lib/adodb/adodb.inc.php +++ b/lib/adodb/adodb.inc.php @@ -14,7 +14,7 @@ /** \mainpage - @version V5.10 10 Nov 2009 (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved. + @version V5.11 5 May 2010 (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved. Released under both BSD license and Lesser GPL library license. You can choose which license you prefer. @@ -177,7 +177,7 @@ function ADODB_Setup() /** * ADODB version as a string. */ - $ADODB_vers = 'V5.10 10 Nov 2009 (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved. Released BSD & LGPL.'; + $ADODB_vers = 'V5.11 5 May 2010 (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved. Released BSD & LGPL.'; /** * Determines whether recordset->RecordCount() is used. @@ -403,6 +403,7 @@ class ADOConnection { var $fetchMode=false; var $null2null = 'null'; // in autoexecute/getinsertsql/getupdatesql, this value will be converted to a null + var $bulkBind = false; // enable 2D Execute array // // PRIVATE VARS // @@ -435,7 +436,9 @@ static function Version() { global $ADODB_vers; - return (float) substr($ADODB_vers,1); + $ok = preg_match( '/^[Vv]([0-9\.]+)/', $ADODB_vers, $matches ); + if (!$ok) return (float) substr($ADODB_vers,1); + else return $matches[1]; } /** @@ -511,15 +514,15 @@ function Connect($argHostname = "", $argUsername = "", $argPassword = "", $argDa { if ($argHostname != "") $this->host = $argHostname; if ($argUsername != "") $this->user = $argUsername; - if ($argPassword != "") $this->password = $argPassword; // not stored for security reasons + if ($argPassword != "") $this->password = 'not stored'; // not stored for security reasons if ($argDatabaseName != "") $this->database = $argDatabaseName; $this->_isPersistentConnection = false; if ($forceNew) { - if ($rez=$this->_nconnect($this->host, $this->user, $this->password, $this->database)) return true; + if ($rez=$this->_nconnect($this->host, $this->user, $argPassword, $this->database)) return true; } else { - if ($rez=$this->_connect($this->host, $this->user, $this->password, $this->database)) return true; + if ($rez=$this->_connect($this->host, $this->user, $argPassword, $this->database)) return true; } if (isset($rez)) { $err = $this->ErrorMsg(); @@ -577,12 +580,12 @@ function PConnect($argHostname = "", $argUsername = "", $argPassword = "", $argD if ($argHostname != "") $this->host = $argHostname; if ($argUsername != "") $this->user = $argUsername; - if ($argPassword != "") $this->password = $argPassword; + if ($argPassword != "") $this->password = 'not stored'; if ($argDatabaseName != "") $this->database = $argDatabaseName; $this->_isPersistentConnection = true; - if ($rez = $this->_pconnect($this->host, $this->user, $this->password, $this->database)) return true; + if ($rez = $this->_pconnect($this->host, $this->user, $argPassword, $this->database)) return true; if (isset($rez)) { $err = $this->ErrorMsg(); if (empty($err)) $err = "Connection error to server '$argHostname' with user '$argUsername'"; @@ -716,7 +719,7 @@ function nextId($seq_name) * @param $table name of table to lock * @param $where where clause to use, eg: "WHERE row=12". If left empty, will escalate to table lock */ - function RowLock($table,$where,$col='1 as ignore') + function RowLock($table,$where,$col='1 as adodbignore') { return false; } @@ -950,7 +953,7 @@ function Execute($sql,$inputarr=false) $element0 = reset($inputarr); # is_object check because oci8 descriptors can be passed in - $array_2d = is_array($element0) && !is_object(reset($element0)); + $array_2d = $this->bulkBind && is_array($element0) && !is_object(reset($element0)); //remove extra memory copy of input -mikefedyk unset($element0); @@ -4149,11 +4152,25 @@ function ADONewConnection($db='') // special handling of oracle, which might not have host $fakedsn = str_replace('@/','@adodb-fakehost/',$fakedsn); } + + if ((strpos($origdsn, 'sqlite')) !== FALSE) { + // special handling for SQLite, it only might have the path to the database file. + // If you try to connect to a SQLite database using a dsn like 'sqlite:///path/to/database', the 'parse_url' php function + // will throw you an exception with a message such as "unable to parse url" + list($scheme, $path) = explode('://', $origdsn); + $dsna['scheme'] = $scheme; + if ($qmark = strpos($path,'?')) { + $dsn['query'] = substr($path,$qmark+1); + $path = substr($path,0,$qmark); + } + $dsna['path'] = '/' . urlencode($path); + } else $dsna = @parse_url($fakedsn); + if (!$dsna) { return $false; } - $dsna['scheme'] = substr($origdsn,0,$at); + $dsna['scheme'] = substr($origdsn,0,$at); if ($at2 !== FALSE) { $dsna['host'] = ''; } diff --git a/lib/adodb/datadict/datadict-access.inc.php b/lib/adodb/datadict/datadict-access.inc.php index 8cd25d568fc50..294b8aea234f4 100644 --- a/lib/adodb/datadict/datadict-access.inc.php +++ b/lib/adodb/datadict/datadict-access.inc.php @@ -1,7 +1,7 @@ debug) ADOConnection::outp("AlterColumnSQL not supported natively by SQLite"); + return array(); + } + + function DropColumnSQL($tabname, $flds) + { + if ($this->debug) ADOConnection::outp("DropColumnSQL not supported natively by SQLite"); + return array(); + } + + function RenameColumnSQL($tabname,$oldcolumn,$newcolumn,$flds='') + { + if ($this->debug) ADOConnection::outp("RenameColumnSQL not supported natively by SQLite"); + return array(); + } + +} +?> diff --git a/lib/adodb/datadict/datadict-sybase.inc.php b/lib/adodb/datadict/datadict-sybase.inc.php index a3fd0bcbef82d..fea2d9873e9d9 100644 --- a/lib/adodb/datadict/datadict-sybase.inc.php +++ b/lib/adodb/datadict/datadict-sybase.inc.php @@ -1,7 +1,7 @@ CursorLocation = $this->_cursor_location; return $dbc->State > 0; } catch (exception $e) { - if ($this->debug);echo "
",$argHostname,"\n",$e,"
\n"; + if ($this->debug) echo "
",$argHostname,"\n",$e,"
\n"; } return false; diff --git a/lib/adodb/drivers/adodb-ado_access.inc.php b/lib/adodb/drivers/adodb-ado_access.inc.php index 3a827a5d957ef..5b30f440aa4c4 100644 --- a/lib/adodb/drivers/adodb-ado_access.inc.php +++ b/lib/adodb/drivers/adodb-ado_access.inc.php @@ -1,6 +1,6 @@ host) && ADODB_PHPVER >= 0x4300) { - $dsn = strtoupper($this->host); - $first = true; - $found = false; - - if (!function_exists('db2_data_source')) return false; - - while(true) { - - $rez = @db2_data_source($this->_connectionID, - $first ? SQL_FETCH_FIRST : SQL_FETCH_NEXT); - $first = false; - if (!is_array($rez)) break; - if (strtoupper($rez['server']) == $dsn) { - $found = true; - break; - } - } - if (!$found) return ADOConnection::ServerInfo(); - if (!isset($rez['version'])) $rez['version'] = ''; - return $rez; + $row = $this->GetRow("SELECT service_level, fixpack_num FROM TABLE(sysproc.env_get_inst_info()) + as INSTANCEINFO"); + + + if ($row) { + $info['version'] = $row[0].':'.$row[1]; + $info['fixpack'] = $row[1]; + $info['description'] = ''; } else { return ADOConnection::ServerInfo(); } + + return $info; } function CreateSequence($seqname='adodbseq',$start=1) diff --git a/lib/adodb/drivers/adodb-db2oci.inc.php b/lib/adodb/drivers/adodb-db2oci.inc.php index 32f2132242619..6afa9443530cb 100644 --- a/lib/adodb/drivers/adodb-db2oci.inc.php +++ b/lib/adodb/drivers/adodb-db2oci.inc.php @@ -1,6 +1,6 @@ $_COLONSZ) return $p; + $_COLONARR[] = $v; + return '?'; +} + +function _colonscope($sql,$arr) +{ +global $_COLONARR,$_COLONSZ; + + $_COLONARR = array(); + $_COLONSZ = sizeof($arr); + + $sql2 = preg_replace("/(:[0-9]+)/e","_colontrack('\\1')",$sql); + + if (empty($_COLONARR)) return array($sql,$arr); + + foreach($_COLONARR as $k => $v) { + $arr2[] = $arr[$v]; + } + + return array($sql2,$arr2); +} + +class ADODB_db2oci extends ADODB_db2 { + var $databaseType = "db2oci"; + var $sysTimeStamp = 'sysdate'; + var $sysDate = 'trunc(sysdate)'; + + function ADODB_db2oci() + { + $this->ADODB_db2(); + } + + + function _Execute($sql, $inputarr) + { + if ($inputarr) list($sql,$inputarr) = _colonscope($sql, $inputarr); + return parent::_Execute($sql, $inputarr); + } +}; + + +class ADORecordSet_db2oci extends ADORecordSet_odbc { + + var $databaseType = "db2oci"; + + function ADORecordSet_db2oci($id,$mode=false) + { + return $this->ADORecordSet_db2($id,$mode); + } +} + +} //define +?> \ No newline at end of file diff --git a/lib/adodb/drivers/adodb-fbsql.inc.php b/lib/adodb/drivers/adodb-fbsql.inc.php index 13bbd86c472a4..1cb5597b3a928 100644 --- a/lib/adodb/drivers/adodb-fbsql.inc.php +++ b/lib/adodb/drivers/adodb-fbsql.inc.php @@ -1,6 +1,6 @@ _autocommit) $this->BeginTrans(); return $this->GetOne("select $col from $tables where $where for update"); diff --git a/lib/adodb/drivers/adodb-ldap.inc.php b/lib/adodb/drivers/adodb-ldap.inc.php index d6ebb407519b6..4c5eb1a5d5329 100644 --- a/lib/adodb/drivers/adodb-ldap.inc.php +++ b/lib/adodb/drivers/adodb-ldap.inc.php @@ -1,6 +1,6 @@ transCnt) $this->BeginTrans(); return $this->GetOne("select $col from $tables with (ROWLOCK,HOLDLOCK) where $where"); } @@ -476,7 +477,7 @@ function MetaDatabases() // "Stein-Aksel Basma" // tested with MSSQL 2000 - function MetaPrimaryKeys($table) + function MetaPrimaryKeys($table, $owner=false) { global $ADODB_FETCH_MODE; @@ -591,7 +592,7 @@ function Prepare($sql) return array($sql,$this->qstr($sql2),$max,$sql2); } - function PrepareSP($sql) + function PrepareSP($sql,$param=true) { if (!$this->_has_mssql_init) { ADOConnection::outp( "PrepareSP: mssql_init only available since PHP 4.1.0"); @@ -911,11 +912,19 @@ function MoveNext() if (is_array($this->fields)) { if (ADODB_ASSOC_CASE == 0) { foreach($this->fields as $k=>$v) { - $this->fields[strtolower($k)] = $v; + $kn = strtolower($k); + if ($kn <> $k) { + unset($this->fields[$k]); + $this->fields[$kn] = $v; + } } } else if (ADODB_ASSOC_CASE == 1) { foreach($this->fields as $k=>$v) { - $this->fields[strtoupper($k)] = $v; + $kn = strtoupper($k); + if ($kn <> $k) { + unset($this->fields[$k]); + $this->fields[$kn] = $v; + } } } } @@ -956,11 +965,19 @@ function _fetch($ignore_fields=false) if (!$this->fields) { } else if (ADODB_ASSOC_CASE == 0) { foreach($this->fields as $k=>$v) { - $this->fields[strtolower($k)] = $v; + $kn = strtolower($k); + if ($kn <> $k) { + unset($this->fields[$k]); + $this->fields[$kn] = $v; + } } } else if (ADODB_ASSOC_CASE == 1) { foreach($this->fields as $k=>$v) { - $this->fields[strtoupper($k)] = $v; + $kn = strtoupper($k); + if ($kn <> $k) { + unset($this->fields[$k]); + $this->fields[$kn] = $v; + } } } } else { diff --git a/lib/adodb/drivers/adodb-mssql_n.inc.php b/lib/adodb/drivers/adodb-mssql_n.inc.php index 199b100450d88..78d2c6cb8970d 100644 --- a/lib/adodb/drivers/adodb-mssql_n.inc.php +++ b/lib/adodb/drivers/adodb-mssql_n.inc.php @@ -9,7 +9,7 @@ // ADOdb - Database Abstraction Library for PHP // // http://adodb.sourceforge.net/ // // // -// Copyright (C) 2000-2009 John Lim (jlim\@natsoft.com.my) // +// Copyright (c) 2000-2010 John Lim (jlim\@natsoft.com.my) // // All rights reserved. // // Released under both BSD license and LGPL library license. // // Whenever there is any discrepancy between the two licenses, // diff --git a/lib/adodb/drivers/adodb-mssqlnative.inc.php b/lib/adodb/drivers/adodb-mssqlnative.inc.php index 920d947e2e66d..8b326ab695a2d 100644 --- a/lib/adodb/drivers/adodb-mssqlnative.inc.php +++ b/lib/adodb/drivers/adodb-mssqlnative.inc.php @@ -1,6 +1,6 @@ transCnt) $this->BeginTrans(); return $this->GetOne("select $col from $tables with (ROWLOCK,HOLDLOCK) where $where"); } @@ -493,7 +494,7 @@ static function UnixTimeStamp($v) return ADORecordSet_array_mssql::UnixTimeStamp($v); } - function &MetaIndexes($table,$primary=false) + function &MetaIndexes($table,$primary=false, $owner = false) { $table = $this->qstr($table); diff --git a/lib/adodb/drivers/adodb-mssqlpo.inc.php b/lib/adodb/drivers/adodb-mssqlpo.inc.php index d10e1b8455376..dd3b3776468d5 100644 --- a/lib/adodb/drivers/adodb-mssqlpo.inc.php +++ b/lib/adodb/drivers/adodb-mssqlpo.inc.php @@ -1,6 +1,6 @@ compat323 == false && strncasecmp($sql,'sele',4) == 0) { $rs = $this->SelectLimit($sql,1,-1,$inputarr); if ($rs) { $rs->Close(); - if ($rs->EOF) return false; + if ($rs->EOF) return $ADODB_GETONE_EOF; return reset($rs->fields); } } else { diff --git a/lib/adodb/drivers/adodb-mysqli.inc.php b/lib/adodb/drivers/adodb-mysqli.inc.php index d4c3a33762afd..094c150a87175 100644 --- a/lib/adodb/drivers/adodb-mysqli.inc.php +++ b/lib/adodb/drivers/adodb-mysqli.inc.php @@ -1,6 +1,6 @@ transCnt==0) $this->BeginTrans(); if ($where) $where = ' where '.$where; @@ -309,7 +309,7 @@ function MetaDatabases() } - function MetaIndexes ($table, $primary = FALSE) + function MetaIndexes ($table, $primary = FALSE, $owner = false) { // save old fetch mode global $ADODB_FETCH_MODE; diff --git a/lib/adodb/drivers/adodb-mysqlpo.inc.php b/lib/adodb/drivers/adodb-mysqlpo.inc.php index b52ff9608a4da..668bdcf0e0052 100644 --- a/lib/adodb/drivers/adodb-mysqlpo.inc.php +++ b/lib/adodb/drivers/adodb-mysqlpo.inc.php @@ -1,7 +1,7 @@ transCnt==0) $this->BeginTrans(); if ($where) $where = ' where '.$where; diff --git a/lib/adodb/drivers/adodb-mysqlt.inc.php b/lib/adodb/drivers/adodb-mysqlt.inc.php index f14dc0585774b..5007b75699010 100644 --- a/lib/adodb/drivers/adodb-mysqlt.inc.php +++ b/lib/adodb/drivers/adodb-mysqlt.inc.php @@ -1,7 +1,7 @@ transCnt==0) $this->BeginTrans(); if ($where) $where = ' where '.$where; diff --git a/lib/adodb/drivers/adodb-netezza.inc.php b/lib/adodb/drivers/adodb-netezza.inc.php index 8b789433b80a2..0f5a1ee35dfe2 100644 --- a/lib/adodb/drivers/adodb-netezza.inc.php +++ b/lib/adodb/drivers/adodb-netezza.inc.php @@ -1,6 +1,6 @@ _findschema($table, $schema); + $false = false; $save = $ADODB_FETCH_MODE; $ADODB_FETCH_MODE = ADODB_FETCH_NUM; if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false); - - $rs = $this->Execute(sprintf($this->metaColumnsSQL,strtoupper($table))); + + if ($schema) + $rs = $this->Execute(sprintf($this->metaColumnsSQL2, strtoupper($schema), strtoupper($table))); + else + $rs = $this->Execute(sprintf($this->metaColumnsSQL,strtoupper($table))); if (isset($savem)) $this->SetFetchMode($savem); $ADODB_FETCH_MODE = $save; @@ -114,7 +125,7 @@ function MetaColumns($table, $normalize=true) return $false; } $retarr = array(); - while (!$rs->EOF) { //print_r($rs->fields); + while (!$rs->EOF) { $fld = new ADOFieldObject(); $fld->name = $rs->fields[0]; $fld->type = $rs->fields[1]; @@ -322,7 +333,7 @@ function DBTimeStamp($ts,$isfld=false) return 'TO_DATE('.$tss.",'RRRR-MM-DD, HH24:MI:SS')"; } - function RowLock($tables,$where,$col='1 as ignore') + function RowLock($tables,$where,$col='1 as adodbignore') { if ($this->autoCommit) $this->BeginTrans(); return $this->GetOne("select $col from $tables where $where for update"); @@ -972,7 +983,7 @@ function Bind(&$stmt,&$var,$size=4000,$type=false,$name=false,$isOutput=false) ADOConnection::outp("Bind: LOB has been written to temp"); } } else { - $this->_refLOBs[$numlob]['VAR'] = $var; + $this->_refLOBs[$numlob]['VAR'] = &$var; } $rez = $tmp; } else { @@ -1398,6 +1409,7 @@ function _FetchField($fieldOffset = -1) $p = OCIColumnPrecision($this->_queryID, $fieldOffset); $sc = OCIColumnScale($this->_queryID, $fieldOffset); if ($p != 0 && $sc == 0) $fld->type = 'INT'; + $fld->scale = $p; break; case 'CLOB': diff --git a/lib/adodb/drivers/adodb-oci805.inc.php b/lib/adodb/drivers/adodb-oci805.inc.php index 30518721eeb25..6d8a202ca86c0 100644 --- a/lib/adodb/drivers/adodb-oci805.inc.php +++ b/lib/adodb/drivers/adodb-oci805.inc.php @@ -1,6 +1,6 @@ genID = $num; return $num; + } elseif ($this->affected_rows() == 0) { + // some drivers do not return a valid value => try with another method + $value = $this->GetOne("select id from $seq"); + if ($value == $num + 1) { + return $value; + } } } if ($fn = $this->raiseErrorFn) { diff --git a/lib/adodb/drivers/adodb-odbc_db2.inc.php b/lib/adodb/drivers/adodb-odbc_db2.inc.php index b12be032ba93a..8bec473cc263c 100644 --- a/lib/adodb/drivers/adodb-odbc_db2.inc.php +++ b/lib/adodb/drivers/adodb-odbc_db2.inc.php @@ -1,6 +1,6 @@ GetOne($this->identitySQL); } - function RowLock($tables,$where,$col='1 as ignore') + function RowLock($tables,$where,$col='1 as adodbignore') { if ($this->_autocommit) $this->BeginTrans(); return $this->GetOne("select $col from $tables where $where for update"); diff --git a/lib/adodb/drivers/adodb-odbc_mssql.inc.php b/lib/adodb/drivers/adodb-odbc_mssql.inc.php index c8e261b9f1c65..fe4734100a8b2 100644 --- a/lib/adodb/drivers/adodb-odbc_mssql.inc.php +++ b/lib/adodb/drivers/adodb-odbc_mssql.inc.php @@ -1,6 +1,6 @@ 'master'"; var $metaTablesSQL="select name,case when type='U' then 'T' else 'V' end from sysobjects where (type='U' or type='V') and (name not in ('sysallocations','syscolumns','syscomments','sysdepends','sysfilegroups','sysfiles','sysfiles1','sysforeignkeys','sysfulltextcatalogs','sysindexes','sysindexkeys','sysmembers','sysobjects','syspermissions','sysprotects','sysreferences','systypes','sysusers','sysalternates','sysconstraints','syssegments','REFERENTIAL_CONSTRAINTS','CHECK_CONSTRAINTS','CONSTRAINT_TABLE_USAGE','CONSTRAINT_COLUMN_USAGE','VIEWS','VIEW_TABLE_USAGE','VIEW_COLUMN_USAGE','SCHEMATA','TABLES','TABLE_CONSTRAINTS','TABLE_PRIVILEGES','COLUMNS','COLUMN_DOMAIN_USAGE','COLUMN_PRIVILEGES','DOMAINS','DOMAIN_CONSTRAINTS','KEY_COLUMN_USAGE'))"; var $metaColumnsSQL = "select c.name,t.name,c.length from syscolumns c join systypes t on t.xusertype=c.xusertype join sysobjects o on o.id=c.id where o.name='%s'"; var $hasTop = 'top'; // support mssql/interbase SELECT TOP 10 * FROM TABLE diff --git a/lib/adodb/drivers/adodb-odbc_oracle.inc.php b/lib/adodb/drivers/adodb-odbc_oracle.inc.php index 9d2d527f4bb87..7c2c77f82991f 100644 --- a/lib/adodb/drivers/adodb-odbc_oracle.inc.php +++ b/lib/adodb/drivers/adodb-odbc_oracle.inc.php @@ -1,6 +1,6 @@ _connectionID = odbtp_connect($HostOrInterface,$UserOrDSN,$argPassword,$argDatabase); + if ($argPassword && stripos($UserOrDSN,'DRIVER=') !== false) { + $this->_connectionID = odbtp_connect($HostOrInterface,$UserOrDSN.';PWD='.$argPassword); + } else + $this->_connectionID = odbtp_connect($HostOrInterface,$UserOrDSN,$argPassword,$argDatabase); if ($this->_connectionID === false) { $this->_errorMsg = $this->ErrorMsg() ; return false; @@ -551,7 +554,7 @@ function MetaIndexes($table,$primary=false, $owner=false) } } - function MetaIndexes_mssql($table,$primary=false) + function MetaIndexes_mssql($table,$primary=false, $owner = false) { $table = strtolower($this->qstr($table)); diff --git a/lib/adodb/drivers/adodb-odbtp_unicode.inc.php b/lib/adodb/drivers/adodb-odbtp_unicode.inc.php index 0e2e6768d50a0..e61cee7589cca 100644 --- a/lib/adodb/drivers/adodb-odbtp_unicode.inc.php +++ b/lib/adodb/drivers/adodb-odbtp_unicode.inc.php @@ -1,6 +1,6 @@ _connectionID, "begin ".$this->_transmode); } - function RowLock($tables,$where,$col='1 as ignore') + function RowLock($tables,$where,$col='1 as adodbignore') { if (!$this->transCnt) $this->BeginTrans(); return $this->GetOne("select $col from $tables where $where for update"); @@ -584,7 +584,7 @@ function MetaColumns($table,$normalize=true) } - function MetaIndexes ($table, $primary = FALSE) + function MetaIndexes ($table, $primary = FALSE, $owner = false) { global $ADODB_FETCH_MODE; diff --git a/lib/adodb/drivers/adodb-postgres7.inc.php b/lib/adodb/drivers/adodb-postgres7.inc.php index 57fb9a632dabf..eecfdc37bd41b 100644 --- a/lib/adodb/drivers/adodb-postgres7.inc.php +++ b/lib/adodb/drivers/adodb-postgres7.inc.php @@ -1,6 +1,6 @@ GetCol("SELECT columnname FROM COLUMNS WHERE tablename=$table AND mode='KEY' ORDER BY pos"); } - function MetaIndexes ($table, $primary = FALSE) + function MetaIndexes ($table, $primary = FALSE, $owner = false) { $table = $this->Quote(strtoupper($table)); diff --git a/lib/adodb/drivers/adodb-sqlanywhere.inc.php b/lib/adodb/drivers/adodb-sqlanywhere.inc.php index 22293230892a6..3933d85e7dac8 100644 --- a/lib/adodb/drivers/adodb-sqlanywhere.inc.php +++ b/lib/adodb/drivers/adodb-sqlanywhere.inc.php @@ -1,6 +1,6 @@ _connectionID); } - function MetaIndexes($table, $primary = FALSE, $owner=false) + function MetaIndexes($table, $primary = FALSE, $owner=false, $owner = false) { $false = false; // save old fetch mode diff --git a/lib/adodb/drivers/adodb-sqlitepo.inc.php b/lib/adodb/drivers/adodb-sqlitepo.inc.php index 79d809ec63d44..2bdb99a7880a2 100644 --- a/lib/adodb/drivers/adodb-sqlitepo.inc.php +++ b/lib/adodb/drivers/adodb-sqlitepo.inc.php @@ -1,6 +1,6 @@ -$ADODB_LANG_ARRAY = array ( - 'LANG' => 'ar', - DB_ERROR => ' ', - DB_ERROR_ALREADY_EXISTS => ' ', - DB_ERROR_CANNOT_CREATE => ' ', - DB_ERROR_CANNOT_DELETE => ' ', - DB_ERROR_CANNOT_DROP => ' ', - DB_ERROR_CONSTRAINT => ' ', - DB_ERROR_DIVZERO => ' ', - DB_ERROR_INVALID => ' ', - DB_ERROR_INVALID_DATE => ' ', - DB_ERROR_INVALID_NUMBER => ' ', - DB_ERROR_MISMATCH => ' ', - DB_ERROR_NODBSELECTED => ' ', - DB_ERROR_NOSUCHFIELD => ' ', - DB_ERROR_NOSUCHTABLE => ' ', - DB_ERROR_NOT_CAPABLE => ' ', - DB_ERROR_NOT_FOUND => ' ', - DB_ERROR_NOT_LOCKED => ' ', - DB_ERROR_SYNTAX => ' ', - DB_ERROR_UNSUPPORTED => ' ', - DB_ERROR_VALUE_COUNT_ON_ROW => ' ', - DB_ERROR_INVALID_DSN => 'DSN ', - DB_ERROR_CONNECT_FAILED => ' ', - 0 => ' ', // DB_OK - DB_ERROR_NEED_MORE_DATA => ' ', - DB_ERROR_EXTENSION_NOT_FOUND=> ' ', - DB_ERROR_NOSUCHDB => ' ', - DB_ERROR_ACCESS_VIOLATION => ' ' -); -?> \ No newline at end of file diff --git a/lib/adodb/lang/adodb-bg.inc.php b/lib/adodb/lang/adodb-bg.inc.php deleted file mode 100644 index ee307c13fed9c..0000000000000 --- a/lib/adodb/lang/adodb-bg.inc.php +++ /dev/null @@ -1,37 +0,0 @@ - -*/ - -$ADODB_LANG_ARRAY = array ( - 'LANG' => 'bg', - DB_ERROR => ' ', - DB_ERROR_ALREADY_EXISTS => ' ', - DB_ERROR_CANNOT_CREATE => ' ', - DB_ERROR_CANNOT_DELETE => ' ', - DB_ERROR_CANNOT_DROP => ' ', - DB_ERROR_CONSTRAINT => ' ', - DB_ERROR_DIVZERO => ' ', - DB_ERROR_INVALID => '', - DB_ERROR_INVALID_DATE => ' ', - DB_ERROR_INVALID_NUMBER => ' ', - DB_ERROR_MISMATCH => ' ', - DB_ERROR_NODBSELECTED => ' ', - DB_ERROR_NOSUCHFIELD => ' ', - DB_ERROR_NOSUCHTABLE => ' ', - DB_ERROR_NOT_CAPABLE => 'DB backend not capable', - DB_ERROR_NOT_FOUND => ' ', - DB_ERROR_NOT_LOCKED => ' ', - DB_ERROR_SYNTAX => ' ', - DB_ERROR_UNSUPPORTED => ' ', - DB_ERROR_VALUE_COUNT_ON_ROW => ' ', - DB_ERROR_INVALID_DSN => ' DSN', - DB_ERROR_CONNECT_FAILED => ' ', - 0 => ' ', // DB_OK - DB_ERROR_NEED_MORE_DATA => ' ', - DB_ERROR_EXTENSION_NOT_FOUND=> ' ', - DB_ERROR_NOSUCHDB => ' ', - DB_ERROR_ACCESS_VIOLATION => ' ' -); -?> \ No newline at end of file diff --git a/lib/adodb/lang/adodb-bgutf8.inc.php b/lib/adodb/lang/adodb-bgutf8.inc.php deleted file mode 100644 index 5281ed53b6513..0000000000000 --- a/lib/adodb/lang/adodb-bgutf8.inc.php +++ /dev/null @@ -1,37 +0,0 @@ - -*/ - -$ADODB_LANG_ARRAY = array ( - 'LANG' => 'bgutf8', - DB_ERROR => 'неизвестна грешка', - DB_ERROR_ALREADY_EXISTS => 'вече съществува', - DB_ERROR_CANNOT_CREATE => 'не може да бъде създадена', - DB_ERROR_CANNOT_DELETE => 'не може да бъде изтрита', - DB_ERROR_CANNOT_DROP => 'не може да бъде унищожена', - DB_ERROR_CONSTRAINT => 'нарушено условие', - DB_ERROR_DIVZERO => 'деление на нула', - DB_ERROR_INVALID => 'неправилно', - DB_ERROR_INVALID_DATE => 'некоректна дата или час', - DB_ERROR_INVALID_NUMBER => 'невалиден номер', - DB_ERROR_MISMATCH => 'погрешна употреба', - DB_ERROR_NODBSELECTED => 'не е избрана база данни', - DB_ERROR_NOSUCHFIELD => 'несъществуващо поле', - DB_ERROR_NOSUCHTABLE => 'несъществуваща таблица', - DB_ERROR_NOT_CAPABLE => 'DB backend not capable', - DB_ERROR_NOT_FOUND => 'не е намерена', - DB_ERROR_NOT_LOCKED => 'не е заключена', - DB_ERROR_SYNTAX => 'грешен синтаксис', - DB_ERROR_UNSUPPORTED => 'не се поддържа', - DB_ERROR_VALUE_COUNT_ON_ROW => 'некоректен брой колони в реда', - DB_ERROR_INVALID_DSN => 'невалиден DSN', - DB_ERROR_CONNECT_FAILED => 'връзката не може да бъде осъществена', - 0 => 'няма грешки', // DB_OK - DB_ERROR_NEED_MORE_DATA => 'предоставените данни са недостатъчни', - DB_ERROR_EXTENSION_NOT_FOUND=> 'разширението не е намерено', - DB_ERROR_NOSUCHDB => 'несъществуваща база данни', - DB_ERROR_ACCESS_VIOLATION => 'нямате достатъчно права' -); -?> \ No newline at end of file diff --git a/lib/adodb/lang/adodb-ca.inc.php b/lib/adodb/lang/adodb-ca.inc.php deleted file mode 100644 index 3640ebd0bbb95..0000000000000 --- a/lib/adodb/lang/adodb-ca.inc.php +++ /dev/null @@ -1,34 +0,0 @@ - 'ca', - DB_ERROR => 'error desconegut', - DB_ERROR_ALREADY_EXISTS => 'ja existeix', - DB_ERROR_CANNOT_CREATE => 'no es pot crear', - DB_ERROR_CANNOT_DELETE => 'no es pot esborrar', - DB_ERROR_CANNOT_DROP => 'no es pot eliminar', - DB_ERROR_CONSTRAINT => 'violaci de constraint', - DB_ERROR_DIVZERO => 'divisi per zero', - DB_ERROR_INVALID => 'no s vlid', - DB_ERROR_INVALID_DATE => 'la data o l\'hora no sn vlides', - DB_ERROR_INVALID_NUMBER => 'el nombre no s vlid', - DB_ERROR_MISMATCH => 'no hi ha coincidncia', - DB_ERROR_NODBSELECTED => 'cap base de dades seleccionada', - DB_ERROR_NOSUCHFIELD => 'camp inexistent', - DB_ERROR_NOSUCHTABLE => 'taula inexistent', - DB_ERROR_NOT_CAPABLE => 'l\'execuci secundria de DB no pot', - DB_ERROR_NOT_FOUND => 'no trobat', - DB_ERROR_NOT_LOCKED => 'no blocat', - DB_ERROR_SYNTAX => 'error de sintaxi', - DB_ERROR_UNSUPPORTED => 'no suportat', - DB_ERROR_VALUE_COUNT_ON_ROW => 'el nombre de columnes no coincideix amb el nombre de valors en la fila', - DB_ERROR_INVALID_DSN => 'el DSN no s vlid', - DB_ERROR_CONNECT_FAILED => 'connexi fallida', - 0 => 'cap error', // DB_OK - DB_ERROR_NEED_MORE_DATA => 'les dades subministrades sn insuficients', - DB_ERROR_EXTENSION_NOT_FOUND=> 'extensi no trobada', - DB_ERROR_NOSUCHDB => 'base de dades inexistent', - DB_ERROR_ACCESS_VIOLATION => 'permisos insuficients' -); -?> \ No newline at end of file diff --git a/lib/adodb/lang/adodb-cn.inc.php b/lib/adodb/lang/adodb-cn.inc.php deleted file mode 100644 index b10860469c0de..0000000000000 --- a/lib/adodb/lang/adodb-cn.inc.php +++ /dev/null @@ -1,35 +0,0 @@ - 'cn', - DB_ERROR => 'δ֪����', - DB_ERROR_ALREADY_EXISTS => '�Ѿ�����', - DB_ERROR_CANNOT_CREATE => '���ܴ���', - DB_ERROR_CANNOT_DELETE => '����ɾ��', - DB_ERROR_CANNOT_DROP => '���ܶ���', - DB_ERROR_CONSTRAINT => 'Լ������', - DB_ERROR_DIVZERO => '��0��', - DB_ERROR_INVALID => '��Ч', - DB_ERROR_INVALID_DATE => '��Ч�����ڻ���ʱ��', - DB_ERROR_INVALID_NUMBER => '��Ч������', - DB_ERROR_MISMATCH => '��ƥ��', - DB_ERROR_NODBSELECTED => 'û����ݿⱻѡ��', - DB_ERROR_NOSUCHFIELD => 'û����Ӧ���ֶ�', - DB_ERROR_NOSUCHTABLE => 'û����Ӧ�ı�', - DB_ERROR_NOT_CAPABLE => '��ݿ��̨������', - DB_ERROR_NOT_FOUND => 'û�з���', - DB_ERROR_NOT_LOCKED => 'û�б���', - DB_ERROR_SYNTAX => '�﷨����', - DB_ERROR_UNSUPPORTED => '��֧��', - DB_ERROR_VALUE_COUNT_ON_ROW => '�������ۼ�ֵ', - DB_ERROR_INVALID_DSN => '��Ч�����Դ (DSN)', - DB_ERROR_CONNECT_FAILED => '����ʧ��', - 0 => 'û�д���', // DB_OK - DB_ERROR_NEED_MORE_DATA => '�ṩ����ݲ��ܷ��Ҫ��', - DB_ERROR_EXTENSION_NOT_FOUND=> '��չû�б�����', - DB_ERROR_NOSUCHDB => 'û����Ӧ����ݿ�', - DB_ERROR_ACCESS_VIOLATION => 'û�к��ʵ�Ȩ��' -); -?> \ No newline at end of file diff --git a/lib/adodb/lang/adodb-cz.inc.php b/lib/adodb/lang/adodb-cz.inc.php deleted file mode 100644 index e16a22d5a748d..0000000000000 --- a/lib/adodb/lang/adodb-cz.inc.php +++ /dev/null @@ -1,40 +0,0 @@ - - -$ADODB_LANG_ARRAY = array ( - 'LANG' => 'cz', - DB_ERROR => 'nezn�m� chyba', - DB_ERROR_ALREADY_EXISTS => 'ji? existuje', - DB_ERROR_CANNOT_CREATE => 'nelze vytvo?it', - DB_ERROR_CANNOT_DELETE => 'nelze smazat', - DB_ERROR_CANNOT_DROP => 'nelze odstranit', - DB_ERROR_CONSTRAINT => 'poru?en� omezuj�c� podm�nky', - DB_ERROR_DIVZERO => 'd?len� nulou', - DB_ERROR_INVALID => 'neplatn�', - DB_ERROR_INVALID_DATE => 'neplatn� datum nebo ?as', - DB_ERROR_INVALID_NUMBER => 'neplatn� ?�slo', - DB_ERROR_MISMATCH => 'nesouhlas�', - DB_ERROR_NODBSELECTED => '?�dn� datab�ze nen� vybr�na', - DB_ERROR_NOSUCHFIELD => 'pole nenalezeno', - DB_ERROR_NOSUCHTABLE => 'tabulka nenalezena', - DB_ERROR_NOT_CAPABLE => 'nepodporov�no', - DB_ERROR_NOT_FOUND => 'nenalezeno', - DB_ERROR_NOT_LOCKED => 'nezam?eno', - DB_ERROR_SYNTAX => 'syntaktick� chyba', - DB_ERROR_UNSUPPORTED => 'nepodporov�no', - DB_ERROR_VALUE_COUNT_ON_ROW => '', - DB_ERROR_INVALID_DSN => 'neplatn� DSN', - DB_ERROR_CONNECT_FAILED => 'p?ipojen� selhalo', - 0 => 'bez chyb', // DB_OK - DB_ERROR_NEED_MORE_DATA => 'm�lo zdrojov�ch dat', - DB_ERROR_EXTENSION_NOT_FOUND=> 'roz?�?en� nenalezeno', - DB_ERROR_NOSUCHDB => 'datab�ze neexistuje', - DB_ERROR_ACCESS_VIOLATION => 'nedostate?n� pr�va' -); -?> \ No newline at end of file diff --git a/lib/adodb/lang/adodb-da.inc.php b/lib/adodb/lang/adodb-da.inc.php deleted file mode 100644 index ca0e72d614876..0000000000000 --- a/lib/adodb/lang/adodb-da.inc.php +++ /dev/null @@ -1,33 +0,0 @@ - 'da', - DB_ERROR => 'ukendt fejl', - DB_ERROR_ALREADY_EXISTS => 'eksisterer allerede', - DB_ERROR_CANNOT_CREATE => 'kan ikke oprette', - DB_ERROR_CANNOT_DELETE => 'kan ikke slette', - DB_ERROR_CANNOT_DROP => 'kan ikke droppe', - DB_ERROR_CONSTRAINT => 'begrænsning krænket', - DB_ERROR_DIVZERO => 'division med nul', - DB_ERROR_INVALID => 'ugyldig', - DB_ERROR_INVALID_DATE => 'ugyldig dato eller klokkeslet', - DB_ERROR_INVALID_NUMBER => 'ugyldigt tal', - DB_ERROR_MISMATCH => 'mismatch', - DB_ERROR_NODBSELECTED => 'ingen database valgt', - DB_ERROR_NOSUCHFIELD => 'felt findes ikke', - DB_ERROR_NOSUCHTABLE => 'tabel findes ikke', - DB_ERROR_NOT_CAPABLE => 'DB backend opgav', - DB_ERROR_NOT_FOUND => 'ikke fundet', - DB_ERROR_NOT_LOCKED => 'ikke låst', - DB_ERROR_SYNTAX => 'syntaksfejl', - DB_ERROR_UNSUPPORTED => 'ikke understøttet', - DB_ERROR_VALUE_COUNT_ON_ROW => 'resulterende antal felter svarer ikke til forespørgslens antal felter', - DB_ERROR_INVALID_DSN => 'ugyldig DSN', - DB_ERROR_CONNECT_FAILED => 'tilslutning mislykkedes', - 0 => 'ingen fejl', // DB_OK - DB_ERROR_NEED_MORE_DATA => 'utilstrækkelige data angivet', - DB_ERROR_EXTENSION_NOT_FOUND=> 'udvidelse ikke fundet', - DB_ERROR_NOSUCHDB => 'database ikke fundet', - DB_ERROR_ACCESS_VIOLATION => 'utilstrækkelige rettigheder' -); -?> \ No newline at end of file diff --git a/lib/adodb/lang/adodb-de.inc.php b/lib/adodb/lang/adodb-de.inc.php deleted file mode 100644 index 44c57e9ff3edf..0000000000000 --- a/lib/adodb/lang/adodb-de.inc.php +++ /dev/null @@ -1,33 +0,0 @@ - -$ADODB_LANG_ARRAY = array ( - 'LANG' => 'de', - DB_ERROR => 'Unbekannter Fehler', - DB_ERROR_ALREADY_EXISTS => 'existiert bereits', - DB_ERROR_CANNOT_CREATE => 'kann nicht erstellen', - DB_ERROR_CANNOT_DELETE => 'kann nicht löschen', - DB_ERROR_CANNOT_DROP => 'Tabelle oder Index konnte nicht gelöscht werden', - DB_ERROR_CONSTRAINT => 'Constraint Verletzung', - DB_ERROR_DIVZERO => 'Division durch Null', - DB_ERROR_INVALID => 'ung¨ltig', - DB_ERROR_INVALID_DATE => 'ung¨ltiges Datum oder Zeit', - DB_ERROR_INVALID_NUMBER => 'ung¨ltige Zahl', - DB_ERROR_MISMATCH => 'Unverträglichkeit', - DB_ERROR_NODBSELECTED => 'keine Dantebank ausgewählt', - DB_ERROR_NOSUCHFIELD => 'Feld nicht vorhanden', - DB_ERROR_NOSUCHTABLE => 'Tabelle nicht vorhanden', - DB_ERROR_NOT_CAPABLE => 'Funktion nicht installiert', - DB_ERROR_NOT_FOUND => 'nicht gefunden', - DB_ERROR_NOT_LOCKED => 'nicht gesperrt', - DB_ERROR_SYNTAX => 'Syntaxfehler', - DB_ERROR_UNSUPPORTED => 'nicht Unterst¨tzt', - DB_ERROR_VALUE_COUNT_ON_ROW => 'Anzahl der zur¨ckgelieferten Felder entspricht nicht der Anzahl der Felder in der Abfrage', - DB_ERROR_INVALID_DSN => 'ung¨ltiger DSN', - DB_ERROR_CONNECT_FAILED => 'Verbindung konnte nicht hergestellt werden', - 0 => 'kein Fehler', // DB_OK - DB_ERROR_NEED_MORE_DATA => 'Nicht gen¨gend Daten geliefert', - DB_ERROR_EXTENSION_NOT_FOUND=> 'erweiterung nicht gefunden', - DB_ERROR_NOSUCHDB => 'keine Datenbank', - DB_ERROR_ACCESS_VIOLATION => 'ungen¨gende Rechte' -); -?> \ No newline at end of file diff --git a/lib/adodb/lang/adodb-es.inc.php b/lib/adodb/lang/adodb-es.inc.php deleted file mode 100644 index 1e0afbb40d94b..0000000000000 --- a/lib/adodb/lang/adodb-es.inc.php +++ /dev/null @@ -1,33 +0,0 @@ - -$ADODB_LANG_ARRAY = array ( - 'LANG' => 'es', - DB_ERROR => 'error desconocido', - DB_ERROR_ALREADY_EXISTS => 'ya existe', - DB_ERROR_CANNOT_CREATE => 'imposible crear', - DB_ERROR_CANNOT_DELETE => 'imposible borrar', - DB_ERROR_CANNOT_DROP => 'imposible hacer drop', - DB_ERROR_CONSTRAINT => 'violacion de constraint', - DB_ERROR_DIVZERO => 'division por cero', - DB_ERROR_INVALID => 'invalido', - DB_ERROR_INVALID_DATE => 'fecha u hora invalida', - DB_ERROR_INVALID_NUMBER => 'numero invalido', - DB_ERROR_MISMATCH => 'error', - DB_ERROR_NODBSELECTED => 'no hay base de datos seleccionada', - DB_ERROR_NOSUCHFIELD => 'campo invalido', - DB_ERROR_NOSUCHTABLE => 'tabla no existe', - DB_ERROR_NOT_CAPABLE => 'capacidad invalida para esta DB', - DB_ERROR_NOT_FOUND => 'no encontrado', - DB_ERROR_NOT_LOCKED => 'no bloqueado', - DB_ERROR_SYNTAX => 'error de sintaxis', - DB_ERROR_UNSUPPORTED => 'no soportado', - DB_ERROR_VALUE_COUNT_ON_ROW => 'la cantidad de columnas no corresponden a la cantidad de valores', - DB_ERROR_INVALID_DSN => 'DSN invalido', - DB_ERROR_CONNECT_FAILED => 'fallo la conexion', - 0 => 'sin error', // DB_OK - DB_ERROR_NEED_MORE_DATA => 'insuficientes datos', - DB_ERROR_EXTENSION_NOT_FOUND=> 'extension no encontrada', - DB_ERROR_NOSUCHDB => 'base de datos no encontrada', - DB_ERROR_ACCESS_VIOLATION => 'permisos insuficientes' -); -?> \ No newline at end of file diff --git a/lib/adodb/lang/adodb-esperanto.inc.php b/lib/adodb/lang/adodb-esperanto.inc.php deleted file mode 100644 index 16ca00e2fac2f..0000000000000 --- a/lib/adodb/lang/adodb-esperanto.inc.php +++ /dev/null @@ -1,35 +0,0 @@ - 'eo', - DB_ERROR => 'nekonata eraro', - DB_ERROR_ALREADY_EXISTS => 'jam ekzistas', - DB_ERROR_CANNOT_CREATE => 'maleblas krei', - DB_ERROR_CANNOT_DELETE => 'maleblas elimini', - DB_ERROR_CANNOT_DROP => 'maleblas elimini (drop)', - DB_ERROR_CONSTRAINT => 'rompo de kondicxoj de provo', - DB_ERROR_DIVZERO => 'divido per 0 (nul)', - DB_ERROR_INVALID => 'malregule', - DB_ERROR_INVALID_DATE => 'malregula dato kaj tempo', - DB_ERROR_INVALID_NUMBER => 'malregula nombro', - DB_ERROR_MISMATCH => 'eraro', - DB_ERROR_NODBSELECTED => 'datumbazo ne elektita', - DB_ERROR_NOSUCHFIELD => 'ne ekzistas kampo', - DB_ERROR_NOSUCHTABLE => 'ne ekzistas tabelo', - DB_ERROR_NOT_CAPABLE => 'DBMS ne povas', - DB_ERROR_NOT_FOUND => 'ne trovita', - DB_ERROR_NOT_LOCKED => 'ne blokita', - DB_ERROR_SYNTAX => 'sintaksa eraro', - DB_ERROR_UNSUPPORTED => 'ne apogata', - DB_ERROR_VALUE_COUNT_ON_ROW => 'nombrilo de valoroj en linio', - DB_ERROR_INVALID_DSN => 'malregula DSN-o', - DB_ERROR_CONNECT_FAILED => 'konekto malsukcesa', - 0 => 'cxio bone', // DB_OK - DB_ERROR_NEED_MORE_DATA => 'ne suficxe da datumo', - DB_ERROR_EXTENSION_NOT_FOUND=> 'etendo ne trovita', - DB_ERROR_NOSUCHDB => 'datumbazo ne ekzistas', - DB_ERROR_ACCESS_VIOLATION => 'ne suficxe da rajto por atingo' -); -?> \ No newline at end of file diff --git a/lib/adodb/lang/adodb-fa.inc.php b/lib/adodb/lang/adodb-fa.inc.php deleted file mode 100644 index a58a21cc6ce5c..0000000000000 --- a/lib/adodb/lang/adodb-fa.inc.php +++ /dev/null @@ -1,35 +0,0 @@ - */ - -$ADODB_LANG_ARRAY = array ( - 'LANG' => 'fa', - DB_ERROR => 'خطای ناشناخته', - DB_ERROR_ALREADY_EXISTS => 'وجود دارد', - DB_ERROR_CANNOT_CREATE => 'امکان create وجود ندارد', - DB_ERROR_CANNOT_DELETE => 'امکان حذف وجود ندارد', - DB_ERROR_CANNOT_DROP => 'امکان drop وجود ندارد', - DB_ERROR_CONSTRAINT => 'نقض شرط', - DB_ERROR_DIVZERO => 'تقسیم بر صفر', - DB_ERROR_INVALID => 'نامعتبر', - DB_ERROR_INVALID_DATE => 'زمان یا تاریخ نامعتبر', - DB_ERROR_INVALID_NUMBER => 'عدد نامعتبر', - DB_ERROR_MISMATCH => 'عدم مطابقت', - DB_ERROR_NODBSELECTED => 'بانک اطلاعاتی انتخاب نشده است', - DB_ERROR_NOSUCHFIELD => 'چنین ستونی وجود ندارد', - DB_ERROR_NOSUCHTABLE => 'چنین جدولی وجود ندارد', - DB_ERROR_NOT_CAPABLE => 'backend بانک اطلاعاتی قادر نیست', - DB_ERROR_NOT_FOUND => 'پیدا نشد', - DB_ERROR_NOT_LOCKED => 'قفل نشده', - DB_ERROR_SYNTAX => 'خطای دستوری', - DB_ERROR_UNSUPPORTED => 'پشتیبانی نمی شود', - DB_ERROR_VALUE_COUNT_ON_ROW => 'شمارش مقادیر روی ردیف', - DB_ERROR_INVALID_DSN => 'DSN نامعتبر', - DB_ERROR_CONNECT_FAILED => 'ارتباط برقرار نشد', - 0 => 'بدون خطا', // DB_OK - DB_ERROR_NEED_MORE_DATA => 'داده ناکافی است', - DB_ERROR_EXTENSION_NOT_FOUND=> 'extension پیدا نشد', - DB_ERROR_NOSUCHDB => 'چنین بانک اطلاعاتی وجود ندارد', - DB_ERROR_ACCESS_VIOLATION => 'حق دسترسی ناکافی' -); -?> \ No newline at end of file diff --git a/lib/adodb/lang/adodb-fr.inc.php b/lib/adodb/lang/adodb-fr.inc.php deleted file mode 100644 index 11127cd60b6d7..0000000000000 --- a/lib/adodb/lang/adodb-fr.inc.php +++ /dev/null @@ -1,33 +0,0 @@ - 'fr', - DB_ERROR => 'erreur inconnue', - DB_ERROR_ALREADY_EXISTS => 'existe déjà', - DB_ERROR_CANNOT_CREATE => 'crétion impossible', - DB_ERROR_CANNOT_DELETE => 'effacement impossible', - DB_ERROR_CANNOT_DROP => 'suppression impossible', - DB_ERROR_CONSTRAINT => 'violation de contrainte', - DB_ERROR_DIVZERO => 'division par zéro', - DB_ERROR_INVALID => 'invalide', - DB_ERROR_INVALID_DATE => 'date ou heure invalide', - DB_ERROR_INVALID_NUMBER => 'nombre invalide', - DB_ERROR_MISMATCH => 'erreur de concordance', - DB_ERROR_NODBSELECTED => 'pas de base de donnéessélectionnée', - DB_ERROR_NOSUCHFIELD => 'nom de colonne invalide', - DB_ERROR_NOSUCHTABLE => 'table ou vue inexistante', - DB_ERROR_NOT_CAPABLE => 'fonction optionnelle non installée', - DB_ERROR_NOT_FOUND => 'pas trouvé', - DB_ERROR_NOT_LOCKED => 'non verrouillé', - DB_ERROR_SYNTAX => 'erreur de syntaxe', - DB_ERROR_UNSUPPORTED => 'non supporté', - DB_ERROR_VALUE_COUNT_ON_ROW => 'valeur insérée trop grande pour colonne', - DB_ERROR_INVALID_DSN => 'DSN invalide', - DB_ERROR_CONNECT_FAILED => 'échec à la connexion', - 0 => "pas d'erreur", // DB_OK - DB_ERROR_NEED_MORE_DATA => 'données fournies insuffisantes', - DB_ERROR_EXTENSION_NOT_FOUND=> 'extension non trouvée', - DB_ERROR_NOSUCHDB => 'base de données inconnue', - DB_ERROR_ACCESS_VIOLATION => 'droits insuffisants' -); -?> \ No newline at end of file diff --git a/lib/adodb/lang/adodb-hu.inc.php b/lib/adodb/lang/adodb-hu.inc.php deleted file mode 100644 index d6f0ef82da6c2..0000000000000 --- a/lib/adodb/lang/adodb-hu.inc.php +++ /dev/null @@ -1,34 +0,0 @@ - -$ADODB_LANG_ARRAY = array ( - 'LANG' => 'hu', - DB_ERROR => 'ismeretlen hiba', - DB_ERROR_ALREADY_EXISTS => 'mr ltezik', - DB_ERROR_CANNOT_CREATE => 'nem sikerlt ltrehozni', - DB_ERROR_CANNOT_DELETE => 'nem sikerlt trlni', - DB_ERROR_CANNOT_DROP => 'nem sikerlt eldobni', - DB_ERROR_CONSTRAINT => 'szablyok megszegse', - DB_ERROR_DIVZERO => 'oszts nullval', - DB_ERROR_INVALID => 'rvnytelen', - DB_ERROR_INVALID_DATE => 'rvnytelen dtum vagy id', - DB_ERROR_INVALID_NUMBER => 'rvnytelen szm', - DB_ERROR_MISMATCH => 'nem megfelel', - DB_ERROR_NODBSELECTED => 'nincs kivlasztott adatbzis', - DB_ERROR_NOSUCHFIELD => 'nincs ilyen mez', - DB_ERROR_NOSUCHTABLE => 'nincs ilyen tbla', - DB_ERROR_NOT_CAPABLE => 'DB backend nem tmogatja', - DB_ERROR_NOT_FOUND => 'nem tallhat', - DB_ERROR_NOT_LOCKED => 'nincs lezrva', - DB_ERROR_SYNTAX => 'szintaktikai hiba', - DB_ERROR_UNSUPPORTED => 'nem tmogatott', - DB_ERROR_VALUE_COUNT_ON_ROW => 'soron vgzett rtk szmlls', - DB_ERROR_INVALID_DSN => 'hibs DSN', - DB_ERROR_CONNECT_FAILED => 'sikertelen csatlakozs', - 0 => 'nincs hiba', // DB_OK - DB_ERROR_NEED_MORE_DATA => 'tl kevs az adat', - DB_ERROR_EXTENSION_NOT_FOUND=> 'bvtmny nem tallhat', - DB_ERROR_NOSUCHDB => 'nincs ilyen adatbzis', - DB_ERROR_ACCESS_VIOLATION => 'nincs jogosultsg' -); -?> \ No newline at end of file diff --git a/lib/adodb/lang/adodb-it.inc.php b/lib/adodb/lang/adodb-it.inc.php deleted file mode 100644 index ac5cc5a7d962a..0000000000000 --- a/lib/adodb/lang/adodb-it.inc.php +++ /dev/null @@ -1,34 +0,0 @@ - 'it', - DB_ERROR => 'errore sconosciuto', - DB_ERROR_ALREADY_EXISTS => 'esiste già', - DB_ERROR_CANNOT_CREATE => 'non posso creare', - DB_ERROR_CANNOT_DELETE => 'non posso cancellare', - DB_ERROR_CANNOT_DROP => 'non posso eliminare', - DB_ERROR_CONSTRAINT => 'violazione constraint', - DB_ERROR_DIVZERO => 'divisione per zero', - DB_ERROR_INVALID => 'non valido', - DB_ERROR_INVALID_DATE => 'data od ora non valida', - DB_ERROR_INVALID_NUMBER => 'numero non valido', - DB_ERROR_MISMATCH => 'diversi', - DB_ERROR_NODBSELECTED => 'nessun database selezionato', - DB_ERROR_NOSUCHFIELD => 'nessun campo trovato', - DB_ERROR_NOSUCHTABLE => 'nessuna tabella trovata', - DB_ERROR_NOT_CAPABLE => 'DB backend non abilitato', - DB_ERROR_NOT_FOUND => 'non trovato', - DB_ERROR_NOT_LOCKED => 'non bloccato', - DB_ERROR_SYNTAX => 'errore di sintassi', - DB_ERROR_UNSUPPORTED => 'non supportato', - DB_ERROR_VALUE_COUNT_ON_ROW => 'valore inserito troppo grande per una colonna', - DB_ERROR_INVALID_DSN => 'DSN non valido', - DB_ERROR_CONNECT_FAILED => 'connessione fallita', - 0 => 'nessun errore', // DB_OK - DB_ERROR_NEED_MORE_DATA => 'dati inseriti insufficienti', - DB_ERROR_EXTENSION_NOT_FOUND=> 'estensione non trovata', - DB_ERROR_NOSUCHDB => 'database non trovato', - DB_ERROR_ACCESS_VIOLATION => 'permessi insufficienti' -); -?> \ No newline at end of file diff --git a/lib/adodb/lang/adodb-nl.inc.php b/lib/adodb/lang/adodb-nl.inc.php deleted file mode 100644 index abe77b5282e45..0000000000000 --- a/lib/adodb/lang/adodb-nl.inc.php +++ /dev/null @@ -1,33 +0,0 @@ - 'nl', - DB_ERROR => 'onbekende fout', - DB_ERROR_ALREADY_EXISTS => 'bestaat al', - DB_ERROR_CANNOT_CREATE => 'kan niet aanmaken', - DB_ERROR_CANNOT_DELETE => 'kan niet wissen', - DB_ERROR_CANNOT_DROP => 'kan niet verwijderen', - DB_ERROR_CONSTRAINT => 'constraint overtreding', - DB_ERROR_DIVZERO => 'poging tot delen door nul', - DB_ERROR_INVALID => 'ongeldig', - DB_ERROR_INVALID_DATE => 'ongeldige datum of tijd', - DB_ERROR_INVALID_NUMBER => 'ongeldig nummer', - DB_ERROR_MISMATCH => 'is incorrect', - DB_ERROR_NODBSELECTED => 'geen database geselecteerd', - DB_ERROR_NOSUCHFIELD => 'onbekend veld', - DB_ERROR_NOSUCHTABLE => 'onbekende tabel', - DB_ERROR_NOT_CAPABLE => 'database systeem is niet tot uitvoer in staat', - DB_ERROR_NOT_FOUND => 'niet gevonden', - DB_ERROR_NOT_LOCKED => 'niet vergrendeld', - DB_ERROR_SYNTAX => 'syntaxis fout', - DB_ERROR_UNSUPPORTED => 'niet ondersteund', - DB_ERROR_VALUE_COUNT_ON_ROW => 'waarde telling op rij', - DB_ERROR_INVALID_DSN => 'ongeldige DSN', - DB_ERROR_CONNECT_FAILED => 'connectie mislukt', - 0 => 'geen fout', // DB_OK - DB_ERROR_NEED_MORE_DATA => 'onvoldoende data gegeven', - DB_ERROR_EXTENSION_NOT_FOUND=> 'extensie niet gevonden', - DB_ERROR_NOSUCHDB => 'onbekende database', - DB_ERROR_ACCESS_VIOLATION => 'onvoldoende rechten' -); -?> \ No newline at end of file diff --git a/lib/adodb/lang/adodb-pl.inc.php b/lib/adodb/lang/adodb-pl.inc.php deleted file mode 100644 index 9d9e390676234..0000000000000 --- a/lib/adodb/lang/adodb-pl.inc.php +++ /dev/null @@ -1,35 +0,0 @@ - - -$ADODB_LANG_ARRAY = array ( - 'LANG' => 'pl', - DB_ERROR => 'niezidentyfikowany bd', - DB_ERROR_ALREADY_EXISTS => 'ju istniej', - DB_ERROR_CANNOT_CREATE => 'nie mona stworzy', - DB_ERROR_CANNOT_DELETE => 'nie mona usun', - DB_ERROR_CANNOT_DROP => 'nie mona porzuci', - DB_ERROR_CONSTRAINT => 'pogwacenie uprawnie', - DB_ERROR_DIVZERO => 'dzielenie przez zero', - DB_ERROR_INVALID => 'bdny', - DB_ERROR_INVALID_DATE => 'bdna godzina lub data', - DB_ERROR_INVALID_NUMBER => 'bdny numer', - DB_ERROR_MISMATCH => 'niedopasowanie', - DB_ERROR_NODBSELECTED => 'baza danych nie zostaa wybrana', - DB_ERROR_NOSUCHFIELD => 'nie znaleziono pola', - DB_ERROR_NOSUCHTABLE => 'nie znaleziono tabeli', - DB_ERROR_NOT_CAPABLE => 'nie zdolny', - DB_ERROR_NOT_FOUND => 'nie znaleziono', - DB_ERROR_NOT_LOCKED => 'nie zakmnity', - DB_ERROR_SYNTAX => 'bd skadni', - DB_ERROR_UNSUPPORTED => 'nie obsuguje', - DB_ERROR_VALUE_COUNT_ON_ROW => 'warto liczona w szeregu', - DB_ERROR_INVALID_DSN => 'bdny DSN', - DB_ERROR_CONNECT_FAILED => 'poczenie nie zostao zrealizowane', - 0 => 'brak bdw', // DB_OK - DB_ERROR_NEED_MORE_DATA => 'niedostateczna ilo informacji', - DB_ERROR_EXTENSION_NOT_FOUND=> 'nie znaleziono rozszerzenia', - DB_ERROR_NOSUCHDB => 'nie znaleziono bazy', - DB_ERROR_ACCESS_VIOLATION => 'niedostateczne uprawnienia' -); -?> \ No newline at end of file diff --git a/lib/adodb/lang/adodb-pt-br.inc.php b/lib/adodb/lang/adodb-pt-br.inc.php deleted file mode 100644 index cd28f7e55cab5..0000000000000 --- a/lib/adodb/lang/adodb-pt-br.inc.php +++ /dev/null @@ -1,35 +0,0 @@ - 'pt-br', - DB_ERROR => 'erro desconhecido', - DB_ERROR_ALREADY_EXISTS => 'j existe', - DB_ERROR_CANNOT_CREATE => 'impossvel criar', - DB_ERROR_CANNOT_DELETE => 'impossvel exclur', - DB_ERROR_CANNOT_DROP => 'impossvel remover', - DB_ERROR_CONSTRAINT => 'violao do confinamente', - DB_ERROR_DIVZERO => 'diviso por zero', - DB_ERROR_INVALID => 'invlido', - DB_ERROR_INVALID_DATE => 'data ou hora invlida', - DB_ERROR_INVALID_NUMBER => 'nmero invlido', - DB_ERROR_MISMATCH => 'erro', - DB_ERROR_NODBSELECTED => 'nenhum banco de dados selecionado', - DB_ERROR_NOSUCHFIELD => 'campo invlido', - DB_ERROR_NOSUCHTABLE => 'tabela inexistente', - DB_ERROR_NOT_CAPABLE => 'capacidade invlida para este BD', - DB_ERROR_NOT_FOUND => 'no encontrado', - DB_ERROR_NOT_LOCKED => 'no bloqueado', - DB_ERROR_SYNTAX => 'erro de sintaxe', - DB_ERROR_UNSUPPORTED => -'no suportado', - DB_ERROR_VALUE_COUNT_ON_ROW => 'a quantidade de colunas no corresponde ao de valores', - DB_ERROR_INVALID_DSN => 'DSN invlido', - DB_ERROR_CONNECT_FAILED => 'falha na conexo', - 0 => 'sem erro', // DB_OK - DB_ERROR_NEED_MORE_DATA => 'dados insuficientes', - DB_ERROR_EXTENSION_NOT_FOUND=> 'extenso no encontrada', - DB_ERROR_NOSUCHDB => 'banco de dados no encontrado', - DB_ERROR_ACCESS_VIOLATION => 'permisso insuficiente' -); -?> \ No newline at end of file diff --git a/lib/adodb/lang/adodb-ro.inc.php b/lib/adodb/lang/adodb-ro.inc.php deleted file mode 100644 index bcd7d13228cf2..0000000000000 --- a/lib/adodb/lang/adodb-ro.inc.php +++ /dev/null @@ -1,35 +0,0 @@ - */ - -$ADODB_LANG_ARRAY = array ( - 'LANG' => 'ro', - DB_ERROR => 'eroare necunoscuta', - DB_ERROR_ALREADY_EXISTS => 'deja exista', - DB_ERROR_CANNOT_CREATE => 'nu se poate creea', - DB_ERROR_CANNOT_DELETE => 'nu se poate sterge', - DB_ERROR_CANNOT_DROP => 'nu se poate executa drop', - DB_ERROR_CONSTRAINT => 'violare de constrain', - DB_ERROR_DIVZERO => 'se divide la zero', - DB_ERROR_INVALID => 'invalid', - DB_ERROR_INVALID_DATE => 'data sau timp invalide', - DB_ERROR_INVALID_NUMBER => 'numar invalid', - DB_ERROR_MISMATCH => 'nepotrivire-mismatch', - DB_ERROR_NODBSELECTED => 'nu exista baza de date selectata', - DB_ERROR_NOSUCHFIELD => 'camp inexistent', - DB_ERROR_NOSUCHTABLE => 'tabela inexistenta', - DB_ERROR_NOT_CAPABLE => 'functie optionala neinstalata', - DB_ERROR_NOT_FOUND => 'negasit', - DB_ERROR_NOT_LOCKED => 'neblocat', - DB_ERROR_SYNTAX => 'eroare de sintaxa', - DB_ERROR_UNSUPPORTED => 'nu e suportat', - DB_ERROR_VALUE_COUNT_ON_ROW => 'valoare prea mare pentru coloana', - DB_ERROR_INVALID_DSN => 'DSN invalid', - DB_ERROR_CONNECT_FAILED => 'conectare esuata', - 0 => 'fara eroare', // DB_OK - DB_ERROR_NEED_MORE_DATA => 'data introduse insuficiente', - DB_ERROR_EXTENSION_NOT_FOUND=> 'extensie negasita', - DB_ERROR_NOSUCHDB => 'nu exista baza de date', - DB_ERROR_ACCESS_VIOLATION => 'permisiuni insuficiente' -); -?> \ No newline at end of file diff --git a/lib/adodb/lang/adodb-ru1251.inc.php b/lib/adodb/lang/adodb-ru1251.inc.php deleted file mode 100644 index 1ccdde89f4cc3..0000000000000 --- a/lib/adodb/lang/adodb-ru1251.inc.php +++ /dev/null @@ -1,35 +0,0 @@ - 'ru1251', - DB_ERROR => '����������� ������', - DB_ERROR_ALREADY_EXISTS => '��� ����������', - DB_ERROR_CANNOT_CREATE => '���������� �������', - DB_ERROR_CANNOT_DELETE => '���������� �������', - DB_ERROR_CANNOT_DROP => '���������� ������� (drop)', - DB_ERROR_CONSTRAINT => '��������� ������� ��������', - DB_ERROR_DIVZERO => '������� �� 0', - DB_ERROR_INVALID => '�����������', - DB_ERROR_INVALID_DATE => '������������ ���� ��� �����', - DB_ERROR_INVALID_NUMBER => '������������ �����', - DB_ERROR_MISMATCH => '������', - DB_ERROR_NODBSELECTED => '�� �� �������', - DB_ERROR_NOSUCHFIELD => '�� ���������� ����', - DB_ERROR_NOSUCHTABLE => '�� ���������� �������', - DB_ERROR_NOT_CAPABLE => '���� �� � ���������', - DB_ERROR_NOT_FOUND => '�� �������', - DB_ERROR_NOT_LOCKED => '�� �������������', - DB_ERROR_SYNTAX => '�������������� ������', - DB_ERROR_UNSUPPORTED => '�� ��������������', - DB_ERROR_VALUE_COUNT_ON_ROW => '������� �������� � ������', - DB_ERROR_INVALID_DSN => '������������ DSN', - DB_ERROR_CONNECT_FAILED => '���������� ���������', - 0 => '��� ������', // DB_OK - DB_ERROR_NEED_MORE_DATA => '������������� ������������ ������', - DB_ERROR_EXTENSION_NOT_FOUND=> '���������� �� �������', - DB_ERROR_NOSUCHDB => '�� ���������� ��', - DB_ERROR_ACCESS_VIOLATION => '������������ ���� �������' -); -?> \ No newline at end of file diff --git a/lib/adodb/lang/adodb-sv.inc.php b/lib/adodb/lang/adodb-sv.inc.php deleted file mode 100644 index 268644afe6dd8..0000000000000 --- a/lib/adodb/lang/adodb-sv.inc.php +++ /dev/null @@ -1,33 +0,0 @@ - 'en', - DB_ERROR => 'Ok�nt fel', - DB_ERROR_ALREADY_EXISTS => 'finns redan', - DB_ERROR_CANNOT_CREATE => 'kan inte skapa', - DB_ERROR_CANNOT_DELETE => 'kan inte ta bort', - DB_ERROR_CANNOT_DROP => 'kan inte sl�ppa', - DB_ERROR_CONSTRAINT => 'begr�nsning kr�nkt', - DB_ERROR_DIVZERO => 'division med noll', - DB_ERROR_INVALID => 'ogiltig', - DB_ERROR_INVALID_DATE => 'ogiltigt datum eller tid', - DB_ERROR_INVALID_NUMBER => 'ogiltigt tal', - DB_ERROR_MISMATCH => 'felaktig matchning', - DB_ERROR_NODBSELECTED => 'ingen databas vald', - DB_ERROR_NOSUCHFIELD => 'inget s�dant f�lt', - DB_ERROR_NOSUCHTABLE => 'ingen s�dan tabell', - DB_ERROR_NOT_CAPABLE => 'DB backend klarar det inte', - DB_ERROR_NOT_FOUND => 'finns inte', - DB_ERROR_NOT_LOCKED => 'inte l�st', - DB_ERROR_SYNTAX => 'syntaxfel', - DB_ERROR_UNSUPPORTED => 'st�ds ej', - DB_ERROR_VALUE_COUNT_ON_ROW => 'v�rde r�knat p� rad', - DB_ERROR_INVALID_DSN => 'ogiltig DSN', - DB_ERROR_CONNECT_FAILED => 'anslutning misslyckades', - 0 => 'inget fel', // DB_OK - DB_ERROR_NEED_MORE_DATA => 'otillr�ckligt med data angivet', - DB_ERROR_EXTENSION_NOT_FOUND=> 'ut�kning hittades ej', - DB_ERROR_NOSUCHDB => 'ingen s�dan databas', - DB_ERROR_ACCESS_VIOLATION => 'otillr�ckliga r�ttigheter' -); -?> \ No newline at end of file diff --git a/lib/adodb/lang/adodb-uk1251.inc.php b/lib/adodb/lang/adodb-uk1251.inc.php deleted file mode 100644 index 675016d125e40..0000000000000 --- a/lib/adodb/lang/adodb-uk1251.inc.php +++ /dev/null @@ -1,35 +0,0 @@ - 'uk1251', - DB_ERROR => ' ', - DB_ERROR_ALREADY_EXISTS => ' ', - DB_ERROR_CANNOT_CREATE => ' ', - DB_ERROR_CANNOT_DELETE => ' ', - DB_ERROR_CANNOT_DROP => ' (drop)', - DB_ERROR_CONSTRAINT => ' ', - DB_ERROR_DIVZERO => ' 0', - DB_ERROR_INVALID => '', - DB_ERROR_INVALID_DATE => ' ', - DB_ERROR_INVALID_NUMBER => ' ', - DB_ERROR_MISMATCH => '', - DB_ERROR_NODBSELECTED => ' ', - DB_ERROR_NOSUCHFIELD => ' ', - DB_ERROR_NOSUCHTABLE => ' ', - DB_ERROR_NOT_CAPABLE => ' ', - DB_ERROR_NOT_FOUND => ' ', - DB_ERROR_NOT_LOCKED => ' ', - DB_ERROR_SYNTAX => ' ', - DB_ERROR_UNSUPPORTED => ' ', - DB_ERROR_VALUE_COUNT_ON_ROW => ' ', - DB_ERROR_INVALID_DSN => ' DSN', - DB_ERROR_CONNECT_FAILED => '\' ', - 0 => ' ', // DB_OK - DB_ERROR_NEED_MORE_DATA => ' ', - DB_ERROR_EXTENSION_NOT_FOUND=> ' ', - DB_ERROR_NOSUCHDB => ' ', - DB_ERROR_ACCESS_VIOLATION => ' ' -); -?> \ No newline at end of file diff --git a/lib/adodb/lang/adodb_th.inc.php b/lib/adodb/lang/adodb_th.inc.php deleted file mode 100644 index 3fdd99705f7a7..0000000000000 --- a/lib/adodb/lang/adodb_th.inc.php +++ /dev/null @@ -1,33 +0,0 @@ - -$ADODB_LANG_ARRAY = array ( - 'LANG' => 'th', - DB_ERROR => 'error ไม่รู้สาเหตุ', - DB_ERROR_ALREADY_EXISTS => 'มี?ล้ว', - DB_ERROR_CANNOT_CREATE => 'สร้างไม่ได้', - DB_ERROR_CANNOT_DELETE => 'ลบไม่ได้', - DB_ERROR_CANNOT_DROP => 'drop ไม่ได้', - DB_ERROR_CONSTRAINT => 'constraint violation', - DB_ERROR_DIVZERO => 'หา?ด้วยสู?', - DB_ERROR_INVALID => 'ไม่ valid', - DB_ERROR_INVALID_DATE => 'วันที่ เวลา ไม่ valid', - DB_ERROR_INVALID_NUMBER => 'เลขไม่ valid', - DB_ERROR_MISMATCH => 'mismatch', - DB_ERROR_NODBSELECTED => 'ไม่ได้เลือ??านข้อมูล', - DB_ERROR_NOSUCHFIELD => 'ไม่มีฟีลด์นี้', - DB_ERROR_NOSUCHTABLE => 'ไม่มีตารางนี้', - DB_ERROR_NOT_CAPABLE => 'DB backend not capable', - DB_ERROR_NOT_FOUND => 'ไม่พบ', - DB_ERROR_NOT_LOCKED => 'ไม่ได้ล๊อ?', - DB_ERROR_SYNTAX => 'ผิด syntax', - DB_ERROR_UNSUPPORTED => 'ไม่ support', - DB_ERROR_VALUE_COUNT_ON_ROW => 'value count on row', - DB_ERROR_INVALID_DSN => 'invalid DSN', - DB_ERROR_CONNECT_FAILED => 'ไม่สามารถ connect', - 0 => 'no error', // DB_OK - DB_ERROR_NEED_MORE_DATA => 'ข้อมูลไม่เพียงพอ', - DB_ERROR_EXTENSION_NOT_FOUND=> 'ไม่พบ extension', - DB_ERROR_NOSUCHDB => 'ไม่มีข้อมูลนี้', - DB_ERROR_ACCESS_VIOLATION => 'permissions ไม่พอ' -); -?> \ No newline at end of file diff --git a/lib/adodb/perf/perf-db2.inc.php b/lib/adodb/perf/perf-db2.inc.php index 1a88d46ea1a07..7531e592984e8 100644 --- a/lib/adodb/perf/perf-db2.inc.php +++ b/lib/adodb/perf/perf-db2.inc.php @@ -1,6 +1,6 @@ array( 'DATAC', + "select value from v\$parameter where name = 'memory_max_target'", + 'The memory_max_size is the maximum value to which memory_target can be set.' ), + 'Memory target (11g+)' => array( 'DATAC', + "select value from v\$parameter where name = 'memory_target'", + 'If memory_target is defined then SGA and PGA targets are consolidated into one memory_target.' ), 'SGA Max Size' => array( 'DATAC', - "select value from v\$parameter where name = 'sga_max_size'", + "select nvl(value,0)/1024.0/1024 || 'M' from v\$parameter where name = 'sga_max_size'", 'The sga_max_size is the maximum value to which sga_target can be set.' ), 'SGA target' => array( 'DATAC', - "select value from v\$parameter where name = 'sga_target'", + "select nvl(value,0)/1024.0/1024 || 'M' from v\$parameter where name = 'sga_target'", 'If sga_target is defined then data cache, shared, java and large pool size can be 0. This is because all these pools are consolidated into one sga_target.' ), + 'PGA aggr target' => array( 'DATAC', + "select value from v\$parameter where name = 'pga_aggregate_target'", + 'If pga_aggregate_target is defined then this is the maximum memory that can be allocated for cursor operations such as sorts, group by, joins, merges. When in doubt, set it to 20% of sga_target.' ), 'data cache size' => array('DATAC', "select value from v\$parameter where name = 'db_cache_size'", 'db_cache_size' ), @@ -104,6 +113,7 @@ class perf_oci8 extends ADODB_perf{ "select value from v\$parameter where name='pga_aggregate_target'", 'program global area is private memory for sorting, and hash and bitmap merges - since oracle 9i (pga_aggregate_target)' ), + 'dynamic memory usage' => array('CACHE', "select '-' from dual", '=DynMemoryUsage'), 'Connections', 'current connections' => array('SESS', @@ -184,8 +194,15 @@ class perf_oci8 extends ADODB_perf{ 'Archive Log Dest' => array('BACKUP', "SELECT NVL(v1.value,v2.value) FROM v\$parameter v1, v\$parameter v2 WHERE v1.name='log_archive_dest' AND v2.name='log_archive_dest_10'", ''), - 'Flashback Area' => array('BACKUP', "select nvl(value,'Flashback Area not used') from v\$parameter where name=lower('DB_RECOVERY_FILE_DEST')", 'Flashback area is a folder where all backup data and logs can be stored and managed by Oracle. If Error: message displayed, then it is not in use.'), + 'Flashback Area' => array('BACKUP', "select nvl(value,'Flashback Area not used') from v\$parameter where name=lower('DB_RECOVERY_FILE_DEST')", 'Flashback area is a folder where all backup data and logs can be stored and managed by Oracle. If Error: message displayed, then it is not in use.'), + + 'Flashback Usage' => array('BACKUP', "select nvl('-','Flashback Area not used') from v\$parameter where name=lower('DB_RECOVERY_FILE_DEST')", '=FlashUsage', 'Flashback area usage.'), + 'Control File Keep Time' => array('BACKUP', "select value from v\$parameter where name='control_file_record_keep_time'",'No of days to keep RMAN info in control file. I recommend it be set to x2 or x3 times the frequency of your full backup.'), + 'Recent RMAN Jobs' => array('BACKUP', "select '-' from dual", "=RMAN"), + + // 'Control File Keep Time' => array('BACKUP', "select value from v\$parameter where name='control_file_record_keep_time'",'No of days to keep RMAN info in control file. I recommend it be set to x2 or x3 times the frequency of your full backup.'), + false ); @@ -199,6 +216,35 @@ function perf_oci8(&$conn) $this->conn = $conn; } + function RMAN() + { + $rs = $this->conn->Execute("select * from (select start_time, end_time, operation, status, mbytes_processed, output_device_type + from V\$RMAN_STATUS order by start_time desc) where rownum <=10"); + + $ret = rs2html($rs,false,false,false,false); + return " 

".$ret." 

"; + + } + function DynMemoryUsage() + { + if (@$this->version['version'] >= 11) { + $rs = $this->conn->Execute("select component, current_size/1024./1024 as \"CurrSize (M)\" from V\$MEMORY_DYNAMIC_COMPONENTS"); + + } else + $rs = $this->conn->Execute("select name, round(bytes/1024./1024,2) as \"CurrSize (M)\" from V\$sgainfo"); + + + $ret = rs2html($rs,false,false,false,false); + return " 

".$ret." 

"; + } + + function FlashUsage() + { + $rs = $this->conn->Execute("select * from V\$FLASH_RECOVERY_AREA_USAGE"); + $ret = rs2html($rs,false,false,false,false); + return " 

".$ret." 

"; + } + function WarnPageCost($val) { if ($val == 100) $s = 'Too High. '; @@ -222,10 +268,10 @@ function PGA() if ($this->version['version'] < 9) return 'Oracle 9i or later required'; $rs = $this->conn->Execute("select a.mb,a.targ as pga_size_pct,a.pct from - (select round(pga_target_for_estimate/1024.0/1024.0,0) Mb, + (select round(pga_target_for_estimate/1024.0/1024.0,0) MB, pga_target_factor targ,estd_pga_cache_hit_percentage pct,rownum as r from v\$pga_target_advice) a left join - (select round(pga_target_for_estimate/1024.0/1024.0,0) Mb, + (select round(pga_target_for_estimate/1024.0/1024.0,0) MB, pga_target_factor targ,estd_pga_cache_hit_percentage pct,rownum as r from v\$pga_target_advice) b on a.r = b.r+1 where @@ -322,15 +368,17 @@ function CheckMemory() if ($this->version['version'] < 9) return 'Oracle 9i or later required'; $rs = $this->conn->Execute(" -select a.size_for_estimate as cache_mb_estimate, - case when a.size_factor=1 then - '<<= current' - when a.estd_physical_read_factor-b.estd_physical_read_factor > 0 and a.estd_physical_read_factor<1 then - '- BETTER - ' - else ' ' end as currsize, - a.estd_physical_read_factor-b.estd_physical_read_factor as best_when_0 - from (select size_for_estimate,size_factor,estd_physical_read_factor,rownum r from v\$db_cache_advice) a , - (select size_for_estimate,size_factor,estd_physical_read_factor,rownum r from v\$db_cache_advice) b where a.r = b.r-1"); +select b.size_for_estimate as cache_mb_estimate, + case when b.size_factor=1 then + '<<= Current' + when a.estd_physical_read_factor-b.estd_physical_read_factor > 0.001 and b.estd_physical_read_factor<1 then + '- BETTER than current by ' || round((1-b.estd_physical_read_factor)/b.estd_physical_read_factor*100,2) || '%' + else ' ' end as RATING, + b.estd_physical_read_factor \"Phys. Reads Factor\", + round((a.estd_physical_read_factor-b.estd_physical_read_factor)/b.estd_physical_read_factor*100,2) as \"% Improve\" + from (select size_for_estimate,size_factor,estd_physical_read_factor,rownum r from v\$db_cache_advice order by 1) a , + (select size_for_estimate,size_factor,estd_physical_read_factor,rownum r from v\$db_cache_advice order by 1) b where a.r = b.r-1 + "); if (!$rs) return false; /* @@ -340,7 +388,7 @@ function CheckMemory() if ($rs->EOF) { $s .= "

Cache that is 50% of current size is still too big

"; } else { - $s .= "Ideal size of Data Cache is when \"best_when_0\" changes from a positive number and becomes zero."; + $s .= "Ideal size of Data Cache is when %Improve gets close to zero."; $s .= rs2html($rs,false,false,false,false); } return $s; diff --git a/lib/adodb/perf/perf-postgres.inc.php b/lib/adodb/perf/perf-postgres.inc.php index b376529451d6e..7cb9ea2e7d4a9 100644 --- a/lib/adodb/perf/perf-postgres.inc.php +++ b/lib/adodb/perf/perf-postgres.inc.php @@ -1,7 +1,7 @@