cvs: pear /MDB2/MDB2/Driver/Manager fbsql.php mssql.php mysql.php mysqli.php sqlite.php

From: Date: Sat, 19 Aug 2006 06:42:05 +0000
Subject: cvs: pear /MDB2/MDB2/Driver/Manager fbsql.php mssql.php mysql.php mysqli.php sqlite.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-41729@lists.php.net to get a copy of this message
lsmith Sat Aug 19 06:42:05 2006 UTC Modified files: /pear/MDB2/MDB2/Driver/Manager fbsql.php mssql.php mysql.php mysqli.php sqlite.php Log: - do not list empty contraints and indexes http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2/Driver/Manager/fbsql.php?r1=1.56&r2=1.57&diff_format=u Index: pear/MDB2/MDB2/Driver/Manager/fbsql.php diff -u pear/MDB2/MDB2/Driver/Manager/fbsql.php:1.56 pear/MDB2/MDB2/Driver/Manager/fbsql.php:1.57 --- pear/MDB2/MDB2/Driver/Manager/fbsql.php:1.56 Sat Jul 15 13:07:15 2006 +++ pear/MDB2/MDB2/Driver/Manager/fbsql.php Sat Aug 19 06:42:04 2006 @@ -42,7 +42,7 @@ // | Author: Lukas Smith <smith@pooteeweet.org> | // +----------------------------------------------------------------------+ // -// $Id: fbsql.php,v 1.56 2006/07/15 13:07:15 lsmith Exp $ +// $Id: fbsql.php,v 1.57 2006/08/19 06:42:04 lsmith Exp $ // require_once 'MDB2/Driver/Manager/Common.php'; @@ -468,7 +468,7 @@ $result = array(); foreach ($indexes as $index) { - if ($index != 'PRIMARY' && $index = $this->_fixIndexName($index)) { + if ($index != 'PRIMARY' && ($index = $this->_fixIndexName($index))) { $result[$index] = true; } } http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2/Driver/Manager/mssql.php?r1=1.76&r2=1.77&diff_format=u Index: pear/MDB2/MDB2/Driver/Manager/mssql.php diff -u pear/MDB2/MDB2/Driver/Manager/mssql.php:1.76 pear/MDB2/MDB2/Driver/Manager/mssql.php:1.77 --- pear/MDB2/MDB2/Driver/Manager/mssql.php:1.76 Thu Aug 10 09:54:08 2006 +++ pear/MDB2/MDB2/Driver/Manager/mssql.php Sat Aug 19 06:42:04 2006 @@ -42,7 +42,7 @@ // | Author: Frank M. Kromann <frank@kromann.info> | // +----------------------------------------------------------------------+ // -// $Id: mssql.php,v 1.76 2006/08/10 09:54:08 lsmith Exp $ +// $Id: mssql.php,v 1.77 2006/08/19 06:42:04 lsmith Exp $ // require_once 'MDB2/Driver/Manager/Common.php'; @@ -351,8 +351,8 @@ $pk_all = $db->queryCol($query, 'text', $pk_name); $result = array(); foreach ($indexes as $index) { - if (!in_array($index, $pk_all) && $index != null) { - $result[$this->_fixIndexName($index)] = true; + if (!in_array($index, $pk_all) && ($index = $this->_fixIndexName($index))) { + $result[$index] = true; } } http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2/Driver/Manager/mysql.php?r1=1.82&r2=1.83&diff_format=u Index: pear/MDB2/MDB2/Driver/Manager/mysql.php diff -u pear/MDB2/MDB2/Driver/Manager/mysql.php:1.82 pear/MDB2/MDB2/Driver/Manager/mysql.php:1.83 --- pear/MDB2/MDB2/Driver/Manager/mysql.php:1.82 Sun Aug 13 13:58:56 2006 +++ pear/MDB2/MDB2/Driver/Manager/mysql.php Sat Aug 19 06:42:05 2006 @@ -42,7 +42,7 @@ // | Author: Lukas Smith <smith@pooteeweet.org> | // +----------------------------------------------------------------------+ // -// $Id: mysql.php,v 1.82 2006/08/13 13:58:56 lsmith Exp $ +// $Id: mysql.php,v 1.83 2006/08/19 06:42:05 lsmith Exp $ // require_once 'MDB2/Driver/Manager/Common.php'; @@ -654,8 +654,8 @@ $result = array(); foreach ($indexes as $index_data) { - if ($index_data[$non_unique]) { - $result[$this->_fixIndexName($index_data[$key_name])] = true; + if ($index_data[$non_unique] && ($index = $this->_fixIndexName($index_data[$key_name]))) { + $result[$index] = true; } } @@ -789,7 +789,9 @@ } else { $index = 'PRIMARY'; } - $result[$index] = true; + if (!empty($index)) { + $result[$index] = true; + } } } http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2/Driver/Manager/mysqli.php?r1=1.69&r2=1.70&diff_format=u Index: pear/MDB2/MDB2/Driver/Manager/mysqli.php diff -u pear/MDB2/MDB2/Driver/Manager/mysqli.php:1.69 pear/MDB2/MDB2/Driver/Manager/mysqli.php:1.70 --- pear/MDB2/MDB2/Driver/Manager/mysqli.php:1.69 Sun Aug 13 13:58:56 2006 +++ pear/MDB2/MDB2/Driver/Manager/mysqli.php Sat Aug 19 06:42:05 2006 @@ -42,7 +42,7 @@ // | Author: Lukas Smith <smith@pooteeweet.org> | // +----------------------------------------------------------------------+ // -// $Id: mysqli.php,v 1.69 2006/08/13 13:58:56 lsmith Exp $ +// $Id: mysqli.php,v 1.70 2006/08/19 06:42:05 lsmith Exp $ // require_once 'MDB2/Driver/Manager/Common.php'; @@ -654,8 +654,8 @@ $result = array(); foreach ($indexes as $index_data) { - if ($index_data[$non_unique]) { - $result[$this->_fixIndexName($index_data[$key_name])] = true; + if ($index_data[$non_unique] && ($index = $this->_fixIndexName($index_data[$key_name]))) { + $result[$index] = true; } } @@ -789,7 +789,9 @@ } else { $index = 'PRIMARY'; } - $result[$index] = true; + if (!empty($index)) { + $result[$index] = true; + } } } http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2/Driver/Manager/sqlite.php?r1=1.56&r2=1.57&diff_format=u Index: pear/MDB2/MDB2/Driver/Manager/sqlite.php diff -u pear/MDB2/MDB2/Driver/Manager/sqlite.php:1.56 pear/MDB2/MDB2/Driver/Manager/sqlite.php:1.57 --- pear/MDB2/MDB2/Driver/Manager/sqlite.php:1.56 Fri Aug 11 11:38:10 2006 +++ pear/MDB2/MDB2/Driver/Manager/sqlite.php Sat Aug 19 06:42:05 2006 @@ -42,7 +42,7 @@ // | Author: Lukas Smith <smith@pooteeweet.org> | // +----------------------------------------------------------------------+ // -// $Id: sqlite.php,v 1.56 2006/08/11 11:38:10 lsmith Exp $ +// $Id: sqlite.php,v 1.57 2006/08/19 06:42:05 lsmith Exp $ // require_once 'MDB2/Driver/Manager/Common.php'; @@ -605,8 +605,11 @@ $result = array(); foreach ($indexes as $sql) { - if (preg_match("/^create index ([^ ]*) on /i", $sql, $tmp)) { - $result[$this->_fixIndexName($tmp[1])] = true; + if (preg_match("/^create index ([^ ]+) on /i", $sql, $tmp)) { + $index = $this->_fixIndexName($tmp[1]); + if (!empty($index)) { + $result[$index] = true; + } } } @@ -733,8 +736,11 @@ $result = array(); foreach ($indexes as $sql) { - if (preg_match("/^create unique index ([^ ]*) on /i", $sql, $tmp)) { - $result[$this->_fixIndexName($tmp[1])] = true; + if (preg_match("/^create unique index ([^ ]+) on /i", $sql, $tmp)) { + $index = $this->_fixIndexName($tmp[1]); + if (!empty($index)) { + $result[$index] = true; + } } }

« previous php.pear.cvs (#41729) next »