Update of /cvsroot/mysql-cocoa/MySQL_Display
In directory usw-pr-cvs1:/tmp/cvs-serv15497
Modified Files:
SMySQLResultView.m SMySQLDatabaseDoc.m
Log Message:
Take care of the update of the DB. Still should bug if the columns (name or number) changed from last doQuery.
Abnormal behaviour when linked with the fully_embeded version of the SMySQL framework. Maybe a problem of version of the includes...
Serge Cohen; MySQL Cocoa project, May 7th 2002.
Index: SMySQLResultView.m
===================================================================
RCS file: /cvsroot/mysql-cocoa/MySQL_Display/SMySQLResultView.m,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** SMySQLResultView.m 22 Jan 2002 20:44:37 -0000 1.2
--- SMySQLResultView.m 7 May 2002 17:25:52 -0000 1.3
***************
*** 43,51 ****
"*/
{
if (mResult) {
- // [mResult autorelease];
[mResult release];
}
! NSLog(@" In SMySQLResultView load result, retain : %@\n", mResult);
[mTableView reloadData];
return;
--- 43,57 ----
"*/
{
+ SMySQLResult * theResult = [[[[mTableView window] windowController] document] queryString:mQuery];
+
+ // NSLog(@" In SMySQLResultView load result, retain : %@\n", theResult);
+ if (theResult == nil) {
+ NSBeginAlertSheet(@"Error", @"OK", nil, nil, [mTableView window], self, nil, nil, self, @"Empty result (nil object). There might be an error in the query!");
+ return;
+ }
if (mResult) {
[mResult release];
}
! mResult = [theResult retain];
[mTableView reloadData];
return;
Index: SMySQLDatabaseDoc.m
===================================================================
RCS file: /cvsroot/mysql-cocoa/MySQL_Display/SMySQLDatabaseDoc.m,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** SMySQLDatabaseDoc.m 22 Jan 2002 20:44:37 -0000 1.2
--- SMySQLDatabaseDoc.m 7 May 2002 17:25:52 -0000 1.3
***************
*** 199,202 ****
--- 199,203 ----
"*/
{
+ NSLog (@"in resetConnection : protocol version : %d, server version : %s\n", (int)PROTOCOL_VERSION, MYSQL_SERVER_VERSION);
if ((mHost == nil) || (mLogin == nil) || (mDatabase == nil)) {
// Here we should throw an exception, impossible to connect (or reconnect) to unknown host, login or DB
***************
*** 211,214 ****
--- 212,216 ----
[mConnection selectDB:mDatabase];
}
+ NSLog (@"Now the same info from the Library (no #defines) :\n protocol %@, server version %@, client version %@, host info %@", [mConnection protoInfo], [mConnection serverInfo], [mConnection clientInfo], [mConnection hostInfo]);
return;
}
|