summaryrefslogtreecommitdiff
path: root/VC++Files
diff options
context:
space:
mode:
authorguilhem@mysql.com <>2004-12-09 14:44:10 +0100
committerguilhem@mysql.com <>2004-12-09 14:44:10 +0100
commit1cbc904c596d624232249ac67c83dabe21e1eacb (patch)
treeeaf6f2f2b65c091f3dbda162d6f00154f6680a14 /VC++Files
parent2bf9291b0c5a1776e73a7313232ddcb5086e601b (diff)
downloadmariadb-git-1cbc904c596d624232249ac67c83dabe21e1eacb.tar.gz
Changing the default of libmysqlclient : it's now NO reconnection.
All our programs which use mysql_real_connect() and mysql_connect() are updated accordingly, though I have deliberately made mysqlimport not reconnect anymore (already true for mysqldump >= 4.1.8). All Connector devs have been warned about the change I'm doing here - which was agreed with Monty, and fixes BUG#2555.
Diffstat (limited to 'VC++Files')
-rw-r--r--VC++Files/libmysqltest/mytest.c1
-rw-r--r--VC++Files/mysqlmanager/mysqlmanagerview.cpp5
-rw-r--r--VC++Files/test1/mysql_thr.c1
-rw-r--r--VC++Files/winmysqladmin/main.cpp2
4 files changed, 9 insertions, 0 deletions
diff --git a/VC++Files/libmysqltest/mytest.c b/VC++Files/libmysqltest/mytest.c
index 9af8c486e40..a1dc13db39f 100644
--- a/VC++Files/libmysqltest/mytest.c
+++ b/VC++Files/libmysqltest/mytest.c
@@ -91,6 +91,7 @@ main( int argc, char * argv[] )
mysql_real_connect( myData, NULL, NULL, NULL, NULL, MYSQL_PORT,
NULL, 0 ) )
{
+ myData->reconnect= 1;
if ( mysql_select_db( myData, szDB ) < 0 ) {
printf( "Can't select the %s database !\n", szDB ) ;
mysql_close( myData ) ;
diff --git a/VC++Files/mysqlmanager/mysqlmanagerview.cpp b/VC++Files/mysqlmanager/mysqlmanagerview.cpp
index 1d4756e7d7a..f39e0a9963e 100644
--- a/VC++Files/mysqlmanager/mysqlmanagerview.cpp
+++ b/VC++Files/mysqlmanager/mysqlmanagerview.cpp
@@ -551,6 +551,7 @@ void CMySqlManagerView::OnDblclk(NMHDR* pNMHDR, LRESULT* pResult)
PostMessage(WM_COMMAND,IDM_TOOLS_SERVER_PROPERTIES);
return;
}
+ mysql.reconnect= 1;
if (!(result=mysql_list_processes(&mysql)))
{
return;
@@ -576,6 +577,7 @@ void CMySqlManagerView::OnDblclk(NMHDR* pNMHDR, LRESULT* pResult)
);
return;
}
+ mysql.reconnect= 1;
if (!(result=mysql_list_dbs(&mysql,0)))
{
}
@@ -603,6 +605,7 @@ void CMySqlManagerView::OnDblclk(NMHDR* pNMHDR, LRESULT* pResult)
);
return;
}
+ mysql.reconnect= 1;
CResourceDatabase* pRes = (CResourceDatabase*) pResource;
CString strDB = pResource->GetDisplayName();
strDB.TrimRight();
@@ -641,6 +644,7 @@ void CMySqlManagerView::OnDblclk(NMHDR* pNMHDR, LRESULT* pResult)
);
return;
}
+ mysql.reconnect= 1;
HTREEITEM hParent = m_pTree->GetParentItem(hItem);
memset( &item, 0, sizeof(TV_ITEM) );
item.hItem = hParent;
@@ -714,6 +718,7 @@ void CMySqlManagerView::OnRefresh()
{
return;
}
+ mysql.reconnect= 1;
memset( &item, 0, sizeof(TV_ITEM) );
item.hItem = hParent;
item.mask = TVIF_TEXT | TVIF_HANDLE | TVIF_CHILDREN | TVIF_PARAM ;
diff --git a/VC++Files/test1/mysql_thr.c b/VC++Files/test1/mysql_thr.c
index fac5c37a9af..c2743cb8e4c 100644
--- a/VC++Files/test1/mysql_thr.c
+++ b/VC++Files/test1/mysql_thr.c
@@ -167,6 +167,7 @@ pthread_handler_decl(test_thread,arg)
perror("");
goto end;
}
+ mysql.reconnect= 1;
if (mysql_query(&mysql,"select 1") < 0)
{
fprintf(stderr,"Query failed (%s)\n",mysql_error(&mysql));
diff --git a/VC++Files/winmysqladmin/main.cpp b/VC++Files/winmysqladmin/main.cpp
index dfb2004a780..150bc669c74 100644
--- a/VC++Files/winmysqladmin/main.cpp
+++ b/VC++Files/winmysqladmin/main.cpp
@@ -1337,6 +1337,7 @@ void __fastcall TForm1::IsMySQLInit(void)
}
}
+ MySQL->reconnect= 1;
}
@@ -1348,6 +1349,7 @@ void __fastcall TForm1::IsMySQLInit(void)
MySQL = mysql_init(MySQL);
if(mysql_real_connect(MySQL,host,user,password , 0, 0, NULL, 0))
IsConnect = true;
+ MySQL->reconnect= 1;
}
}
}