Changeset 8709 for trunk/MagicSoft/Mars/msql
- Timestamp:
- 08/25/07 16:30:26 (17 years ago)
- Location:
- trunk/MagicSoft/Mars/msql
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/msql/MSQLMagic.cc
r8589 r8709 69 69 const TString rc = row ? (*row)[0] : ""; 70 70 71 if (row) 72 delete row; 73 71 74 delete res; 72 75 return rc; … … 124 127 125 128 const Int_t rc1 = row && (*row)[0] ? atoi((*row)[0]) : -1; 129 130 if (row) 131 delete row; 132 126 133 delete res1; 134 127 135 return rc1; 128 136 } … … 191 199 if (row && (*row)[0]) 192 200 rc=kTRUE; 201 202 if (row) 203 delete row; 193 204 194 205 delete res; -
trunk/MagicSoft/Mars/msql/MSQLServer.cc
r8185 r8709 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MSQLServer.cc,v 1.1 3 2006-11-01 08:29:45tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MSQLServer.cc,v 1.14 2007-08-25 15:30:26 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 82 82 83 83 TSQLRow *row=res->Next(); 84 const TString desc((*row)[1]); 84 const TString desc(row ? (*row)[1] : ""); 85 86 if (row) 87 delete row; 85 88 86 89 delete res; … … 178 181 { 179 182 TString row0((*row)[0]); 183 delete row; 180 184 181 185 MSQLServer *sql = (MSQLServer*)fList.FindObject(Form("%s/%s/%s", (const char*)fDataBase, (const char*)fTable, (const char*)row0)); … … 202 206 { 203 207 TString row0((*row)[0]); 208 delete row; 204 209 205 210 MSQLServer *sql = (MSQLServer*)fList.FindObject(Form("%s/%s", (const char*)fDataBase, (const char*)row0)); … … 226 231 { 227 232 const TString row0((*row)[0]); 233 delete row; 228 234 229 235 MSQLServer *sql = (MSQLServer*)fList.FindObject(row0); … … 257 263 258 264 TList rows; 265 rows.SetOwner(); 266 259 267 while ((row=res.Next())) 260 268 { … … 305 313 306 314 TList rows; 315 rows.SetOwner(); 316 307 317 while ((row=res->Next())) 308 318 rows.Add(row); … … 767 777 while ((row=res->Next())) 768 778 { 769 TString key = (*row)[3]; 770 if (key!="PRI") 771 continue; 772 773 rc = (*row)[0]; 774 break; 779 const TString key = (*row)[3]; 780 if (key=="PRI") 781 { 782 rc = (*row)[0]; 783 break; 784 } 785 delete row; 775 786 } 776 787
Note:
See TracChangeset
for help on using the changeset viewer.