zak Wed Oct 9 09:05:42 2002 EDT Modified files: /php4/ext/mysql php_mysql.c Log: Minor tweak - using memcpy(), instead of strcpy() for static strings. Gives better performance. Thanks Zeev. Index: php4/ext/mysql/php_mysql.c diff -u php4/ext/mysql/php_mysql.c:1.165 php4/ext/mysql/php_mysql.c:1.166 --- php4/ext/mysql/php_mysql.c:1.165 Wed Oct 9 08:33:40 2002 +++ php4/ext/mysql/php_mysql.c Wed Oct 9 09:05:42 2002 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_mysql.c,v 1.165 2002/10/09 12:33:40 zak Exp $ */ +/* $Id: php_mysql.c,v 1.166 2002/10/09 13:05:42 zak Exp $ */ /* TODO: * @@ -252,12 +252,12 @@ } /* rollback possible transactions */ - strcpy (query, "ROLLBACK"); + memcpy(query, "ROLLBACK", sizeof("ROLLBACK")); /* Binary safe query not required here */ mysql_query(&link->conn, query); /* restore session variable "autocommit" to default (=1) */ - strcpy (query, "SET AUTOCOMMIT=1"); + memcpy(query, "SET AUTOCOMMIT=1", sizeof("SET AUTOCOMMIT=1")); /* Binary safe query not required here */ mysql_query(&link->conn, query); @@ -2198,7 +2198,7 @@ Z_TYPE_P(return_value) = IS_STRING; break; case PHP_MYSQL_FIELD_FLAGS: - strcpy(buf, ""); + memcpy(buf, "", sizeof("")); #ifdef IS_NOT_NULL if (IS_NOT_NULL(mysql_field->flags)) { strcat(buf, "not_null ");
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php