ID: 15764 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Feedback Bug Type: Feature/Change Request Operating System: all PHP Version: 4.0CVS-2002-02-27 New Comment:
Can you mail a unified diff (diff -u) to this list? ([EMAIL PROTECTED]) regards, Derick Previous Comments: ------------------------------------------------------------------------ [2002-02-28 17:18:38] [EMAIL PROTECTED] Would this patch be ok? I am not sure when these constants were added to MYSQL, I could not find them in the mysql docs. I know for sure that the >40000 series has them though... diff ../php4-orig/ext/mysql/php_mysql.c ext/mysql/php_mysql.c 344a345,352 > REGISTER_LONG_CONSTANT("MYSQL_CLIENT_SSL", CLIENT_SSL, CONST_CS | CONST_PERSISTENT); > REGISTER_LONG_CONSTANT("MYSQL_CLIENT_COMPRESS", CLIENT_COMPRESS, CONST_CS | CONST_PERSISTENT); > REGISTER_LONG_CONSTANT("MYSQL_CLIENT_FOUND_ROWS", CLIENT_FOUND_ROWS, CONST_CS | CONST_PERSISTENT); > REGISTER_LONG_CONSTANT("MYSQL_CLIENT_NO_SCHEMA", CLIENT_NO_SCHEMA, CONST_CS | CONST_PERSISTENT); > REGISTER_LONG_CONSTANT("MYSQL_CLIENT_INTERACTIVE ", CLIENT_INTERACTIVE, CONST_CS | CONST_PERSISTENT); > REGISTER_LONG_CONSTANT("MYSQL_CLIENT_ODBC", CLIENT_ODBC, CONST_CS | CONST_PERSISTENT); > REGISTER_LONG_CONSTANT("MYSQL_CLIENT_IGNORE_SPACE", CLIENT_IGNORE_SPACE,CONST_CS | CONST_PERSISTENT); > 436a445 > int client_flags = 0; 439c448 < zval **z_host=NULL, **z_user=NULL, **z_passwd=NULL, **z_new_link=NULL; --- > zval **z_host=NULL, **z_user=NULL, **z_passwd=NULL, **z_new_link=NULL, **z_client_flags=NULL; 441a451 > 495a506,518 > case 5: { > if (zend_get_parameters_ex(5, &z_host, &z_user, &z_passwd, &z_new_link, &z_client_flags) == FAILURE) { > MYSQL_DO_CONNECT_RETURN_FALSE(); > } > convert_to_string_ex(z_user); > convert_to_string_ex(z_passwd); > convert_to_long_ex(z_client_flags); > user = Z_STRVAL_PP(z_user); > passwd = Z_STRVAL_PP(z_passwd); > new_link = Z_BVAL_PP(z_new_link); > client_flags = Z_LVAL_PP(z_client_flags); > } > break; 569c592 < if (mysql_real_connect(&mysql->conn, host, user, passwd, NULL, port, socket, 0)==NULL) { --- > if (mysql_real_connect(&mysql->conn, host, user, passwd, NULL, port, socket, client_flags)==NULL) { 609c632 < if (mysql_real_connect(le->ptr, host, user, passwd, NULL, port, socket, 0)==NULL) { --- > if (mysql_real_connect(le->ptr, host, user, passwd, NULL, port, socket, client_flags)==NULL) { 662c685 < if (mysql_real_connect(&mysql->conn, host, user, passwd, NULL, port, socket, 0)==NULL) { --- > if (mysql_real_connect(&mysql->conn, host, user, passwd, NULL, port, socket, client_flags)==NULL) { ------------------------------------------------------------------------ [2002-02-27 14:26:08] [EMAIL PROTECTED] mysql with a VERSION_ID > 40001 (maybe 40000) supports the following clientflags CLIENT_COMPRESS Use compression protocol. CLIENT_FOUND_ROWS Return the number of found (matched) rows, not the number of affected rows. CLIENT_IGNORE_SPACE Allow spaces after function names. Makes all functions names reserved words. CLIENT_INTERACTIVE Allow interactive_timeout seconds (instead of wait_timeout seconds) of inactivity before closing the connection. CLIENT_NO_SCHEMA Don't allow the db_name.tbl_name.col_name syntax. This is for ODBC. It causes the parser to generate an error if you use that syntax, which is useful for trapping bugs in some ODBC programs. CLIENT_ODBC The client is an ODBC client. This changes mysqld to be more ODBC-friendly. CLIENT_SSL Use SSL (encrypted protocol). It would be nice to add CLIENT_SSL and CLIENT_COMPRESS options to the php_mysql_do_connect() ... ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=15764&edit=1