implemented amb690
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401267
This commit is contained in:
		
							parent
							
								
									ccaa7c95f2
								
							
						
					
					
						commit
						b79f1f6df3
					
				| @ -101,6 +101,12 @@ MYSQL *Connect(const DatabaseInfo *info, char *error, size_t maxlength) | |||||||
| 		mysql_options(mysql, MYSQL_OPT_CONNECT_TIMEOUT, (const char *)&(info->maxTimeout)); | 		mysql_options(mysql, MYSQL_OPT_CONNECT_TIMEOUT, (const char *)&(info->maxTimeout)); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  | 	/* Have MySQL automatically reconnect if it times out or loses connection.
 | ||||||
|  | 	 * This will prevent "MySQL server has gone away" errors after a while. | ||||||
|  | 	 */ | ||||||
|  | 	my_bool my_true = true; | ||||||
|  | 	mysql_options(mysql, MYSQL_OPT_RECONNECT, (const char *)&my_true); | ||||||
|  | 
 | ||||||
| 	if (!mysql_real_connect(mysql, | 	if (!mysql_real_connect(mysql, | ||||||
| 		info->host, | 		info->host, | ||||||
| 		info->user,  | 		info->user,  | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user