My favorites | Sign in
Project Logo
                
Details: Show all Hide all

Earlier this year

  • Oct 27, 2009
    issue 14 (unused variable 'tableName' ) reported by anton.so...@gmail.com   -   What steps will reproduce the problem? -> fmdb/src/FMDatabaseAdditions.m:136:5 Value stored to 'tableName' is never read What is the expected output? What do you see instead? -> As I understand this varible should be used in execquteQuery What version of the product are you using? On what operating system? -> revision 153 Please provide any additional information below.
    What steps will reproduce the problem? -> fmdb/src/FMDatabaseAdditions.m:136:5 Value stored to 'tableName' is never read What is the expected output? What do you see instead? -> As I understand this varible should be used in execquteQuery What version of the product are you using? On what operating system? -> revision 153 Please provide any additional information below.
  • Oct 19, 2009
    r153 (new method for propfind) committed by gusmueller   -   new method for propfind
    new method for propfind
  • Oct 18, 2009
    r152 ( Added: FMDB now checks for longLongValue in NSNu...) committed by gusmueller   -   Added: FMDB now checks for longLongValue in NSNumbers passed for selects or updates, and binds that value to an sqlite int64 Thanks for the patch from Brian Stern! Changed: renamed getDataBaseSchema: to getSchema. It didn't actually use the param. whooops.
    Added: FMDB now checks for longLongValue in NSNumbers passed for selects or updates, and binds that value to an sqlite int64 Thanks for the patch from Brian Stern! Changed: renamed getDataBaseSchema: to getSchema. It didn't actually use the param. whooops.
  • Oct 14, 2009
    r151 ( Reworked: - (id)executeQuery:(NSString *)sql wit...) committed by gusmueller   -   Reworked: - (id)executeQuery:(NSString *)sql withArgumentsInArray:(NSArray *)arguments; - (BOOL) executeUpdate:(NSString*)sql withArgumentsInArray:(NSArray *)arguments; These two methods now point to: - (id) executeQuery:(NSString*)sql withArgumentsInArray:(NSArray*)arrayArgs orVAList:(va_list)args; - (BOOL) executeUpdate:(NSString*)sql withArgumentsInArray:(NSArray*)arrayArgs orVAList:(va_list)args; because the vargs were causing headaches in 64bit land, and on the iphone, and it's fragile n' stuff. Added: - (FMResultSet*) getTableSchema:(NSString*)tableName; - (BOOL) columnExists:(NSString*)tableName columnName:(NSString*)columnName; to FMDatabaseAdditions. Patch from OZLB
    Reworked: - (id)executeQuery:(NSString *)sql withArgumentsInArray:(NSArray *)arguments; - (BOOL) executeUpdate:(NSString*)sql withArgumentsInArray:(NSArray *)arguments; These two methods now point to: - (id) executeQuery:(NSString*)sql withArgumentsInArray:(NSArray*)arrayArgs orVAList:(va_list)args; - (BOOL) executeUpdate:(NSString*)sql withArgumentsInArray:(NSArray*)arrayArgs orVAList:(va_list)args; because the vargs were causing headaches in 64bit land, and on the iphone, and it's fragile n' stuff. Added: - (FMResultSet*) getTableSchema:(NSString*)tableName; - (BOOL) columnExists:(NSString*)tableName columnName:(NSString*)columnName; to FMDatabaseAdditions. Patch from OZLB
  • Sep 22, 2009
    r150 (auto) committed by gusmueller   -   auto
    auto
  • Sep 22, 2009
    r149 (Added: - (BOOL) tableExists:(NSString*)tableName; ...) committed by gusmueller   -   Added: - (BOOL) tableExists:(NSString*)tableName; - (FMResultSet*) getDataBaseSchema:(NSString*)tableName; to FMDatabaseAdditions. Patch from OZLB
    Added: - (BOOL) tableExists:(NSString*)tableName; - (FMResultSet*) getDataBaseSchema:(NSString*)tableName; to FMDatabaseAdditions. Patch from OZLB
  • Sep 22, 2009
    r148 (added checks for running in 64 bit in a couple of the FMData...) committed by gusmueller   -   added checks for running in 64 bit in a couple of the FMDatabaseAddition methods. They crashed otherwise.
    added checks for running in 64 bit in a couple of the FMDatabaseAddition methods. They crashed otherwise.
  • Sep 16, 2009
    issue 13 (Memory Leak in FMResultSet) Status changed by gusmueller   -   Actually- I'm pretty sure this is a bug in the static analyzer. It seems the word "Copy" in the method name, and then assumes it's returning an object which needs a release. This isn't the case though- it returns an autoreleased object, so there's no memory leak here.
    Status: WontFix
    Actually- I'm pretty sure this is a bug in the static analyzer. It seems the word "Copy" in the method name, and then assumes it's returning an object which needs a release. This isn't the case though- it returns an autoreleased object, so there's no memory leak here.
    Status: WontFix
  • Sep 15, 2009
    issue 13 (Memory Leak in FMResultSet) reported by joelrb   -   What steps will reproduce the problem? 1. Create iPhone project in XCode (OS 3.0 or 3.1) 2. Add FMDB classes 3. Scan build with Clang Static Analyzer (checker-0.217) What is the expected output? BUILD SUCCEDED! What do you see instead? Error in FMResultSet.m What version of the product are you using? On what operating system? iPhone OS & SDK 3.1, Clang Static Analyzer (checker-0.217), latest FMDB Please provide any additional information below. This is the method that has a problem (commented portion is mine which eliminates the error, but not sure if that is correct): - (NSData*) dataNoCopyForColumnIndex:(int)columnIdx { if (sqlite3_column_type(statement.statement, columnIdx) == SQLITE_NULL || (columnIdx < 0)) { return nil; } int dataSize = sqlite3_column_bytes(statement.statement, columnIdx); NSData *data = [NSData dataWithBytesNoCopy:(void *)sqlite3_column_blob(statement.statement, columnIdx) length:dataSize freeWhenDone:NO]; //NSData *data = [[NSData alloc] initWithBytesNoCopy:(void *)sqlite3_column_blob(statement.statement, columnIdx) length:dataSize freeWhenDone:NO]; return data; //[data autorelease]; }
    What steps will reproduce the problem? 1. Create iPhone project in XCode (OS 3.0 or 3.1) 2. Add FMDB classes 3. Scan build with Clang Static Analyzer (checker-0.217) What is the expected output? BUILD SUCCEDED! What do you see instead? Error in FMResultSet.m What version of the product are you using? On what operating system? iPhone OS & SDK 3.1, Clang Static Analyzer (checker-0.217), latest FMDB Please provide any additional information below. This is the method that has a problem (commented portion is mine which eliminates the error, but not sure if that is correct): - (NSData*) dataNoCopyForColumnIndex:(int)columnIdx { if (sqlite3_column_type(statement.statement, columnIdx) == SQLITE_NULL || (columnIdx < 0)) { return nil; } int dataSize = sqlite3_column_bytes(statement.statement, columnIdx); NSData *data = [NSData dataWithBytesNoCopy:(void *)sqlite3_column_blob(statement.statement, columnIdx) length:dataSize freeWhenDone:NO]; //NSData *data = [[NSData alloc] initWithBytesNoCopy:(void *)sqlite3_column_blob(statement.statement, columnIdx) length:dataSize freeWhenDone:NO]; return data; //[data autorelease]; }
  • Sep 01, 2009
    r147 ( Added: - (BOOL) openWithFlags:(int)flags; To FMD...) committed by gusmueller   -   Added: - (BOOL) openWithFlags:(int)flags; To FMDatabase, which allows you to open up the database with certain flags for sqlite 3.5+ Thanks to Dan Wright for the addition.
    Added: - (BOOL) openWithFlags:(int)flags; To FMDatabase, which allows you to open up the database with certain flags for sqlite 3.5+ Thanks to Dan Wright for the addition.
  • Jul 31, 2009
    r146 (Left some debug statements in by accident) committed by gusmueller   -   Left some debug statements in by accident
    Left some debug statements in by accident
  • Jul 17, 2009
    r145 (added 'UTF8StringFor*' to FMResultSet) committed by gusmueller   -   added 'UTF8StringFor*' to FMResultSet
    added 'UTF8StringFor*' to FMResultSet
  • Jul 01, 2009
    issue 11 (changed 'stringforcolumn' behavior with iPhone OS3) commented on by saywake   -   Yup, as originally stated, the workaround is fine. What I was concerned about was that it worked fine until the iPhone 3.0 update. I figured that the *change* in behavior was more than "just the way sqlite works". Was just trying to help others with the inconsistent behavior. Either way, I'm fine with it. As you said, we can workaround it. Thanks
    Yup, as originally stated, the workaround is fine. What I was concerned about was that it worked fine until the iPhone 3.0 update. I figured that the *change* in behavior was more than "just the way sqlite works". Was just trying to help others with the inconsistent behavior. Either way, I'm fine with it. As you said, we can workaround it. Thanks
  • Jul 01, 2009
    issue 11 (changed 'stringforcolumn' behavior with iPhone OS3) Status changed by gusmueller   -   Looks like this is just the way sqlite works. You might look around for a sqlite pragma that changes this behavior, but I don't actually know if it exists or not. Here's the test code I came up with, based off what you gave me: FMDBQuickCheck([db executeUpdate:@"create table t4 (a text, b text)"]); FMDBQuickCheck(([db executeUpdate:@"insert into t4 (a, b) values (?, ?)", @"one", @"two"])); rs = [db executeQuery:@"select t4.a as 't4.a', t4.b from t4;"]; FMDBQuickCheck((rs != nil)); [rs next]; FMDBQuickCheck([[rs stringForColumn:@"t4.a"] isEqualToString:@"one"]); FMDBQuickCheck([[rs stringForColumn:@"b"] isEqualToString:@"two"]); The workaround is to do: select t1.a as 't1.a', etc.
    Status: WontFix
    Looks like this is just the way sqlite works. You might look around for a sqlite pragma that changes this behavior, but I don't actually know if it exists or not. Here's the test code I came up with, based off what you gave me: FMDBQuickCheck([db executeUpdate:@"create table t4 (a text, b text)"]); FMDBQuickCheck(([db executeUpdate:@"insert into t4 (a, b) values (?, ?)", @"one", @"two"])); rs = [db executeQuery:@"select t4.a as 't4.a', t4.b from t4;"]; FMDBQuickCheck((rs != nil)); [rs next]; FMDBQuickCheck([[rs stringForColumn:@"t4.a"] isEqualToString:@"one"]); FMDBQuickCheck([[rs stringForColumn:@"b"] isEqualToString:@"two"]); The workaround is to do: select t1.a as 't1.a', etc.
    Status: WontFix
  • Jul 01, 2009
    issue 11 (changed 'stringforcolumn' behavior with iPhone OS3) commented on by saywake   -   oops, forgot a trailing semicolon on the insert statement.
    oops, forgot a trailing semicolon on the insert statement.
  • Jul 01, 2009
    issue 11 (changed 'stringforcolumn' behavior with iPhone OS3) commented on by saywake   -   Simple example: [db executeUpdate:@"create table t1 (a text, b text)"]; [db executeUpdate:@"insert into t1 (a, b) values (?, ?)", @"one", @"two"] FMResultSet *rs = [db executeQuery:@"select t1.a, t1.b from t1"]; while ([rs next]) { NSLog(@"Value for t1.a should be one. value retreived: %@", [rs stringForColumn:@"t1.a"]); } [rs close];
    Simple example: [db executeUpdate:@"create table t1 (a text, b text)"]; [db executeUpdate:@"insert into t1 (a, b) values (?, ?)", @"one", @"two"] FMResultSet *rs = [db executeQuery:@"select t1.a, t1.b from t1"]; while ([rs next]) { NSLog(@"Value for t1.a should be one. value retreived: %@", [rs stringForColumn:@"t1.a"]); } [rs close];
  • Jun 30, 2009
    r144 (auto) committed by gusmueller   -   auto
    auto
  • Jun 26, 2009
    issue 12 (Problem with quotes in query) Status changed by gusmueller   -  
    Status: Done
    Status: Done
  • Jun 26, 2009
    issue 12 (Problem with quotes in query) commented on by killpanda   -   Damn, I didn't think about that! Thanks, it works perfectly now :-)
    Damn, I didn't think about that! Thanks, it works perfectly now :-)
  • Jun 26, 2009
    issue 12 (Problem with quotes in query) commented on by gusmueller   -   What about if you do string concatenation instead of using the '?' ? It seems that sqlite doesn't like doing like statements with it.
    What about if you do string concatenation instead of using the '?' ? It seems that sqlite doesn't like doing like statements with it.
  • Jun 26, 2009
    issue 12 (Problem with quotes in query) reported by killpanda   -   What steps will reproduce the problem? Just enter a query like this one: rs = [db executeQuery:@"select title, price from refurbData where catID = '?'", catID]; And you won't get any results, if you remove the quotes, it works perfectly though. It's a big problem for keywords like "LIKE" which will need quotes for things like "LIKE = '%?%'". What version of the product are you using? On what operating system? I use the last SVN version on the iPhone OS 3.0 (but it did the same thing with 2.2.1).
    What steps will reproduce the problem? Just enter a query like this one: rs = [db executeQuery:@"select title, price from refurbData where catID = '?'", catID]; And you won't get any results, if you remove the quotes, it works perfectly though. It's a big problem for keywords like "LIKE" which will need quotes for things like "LIKE = '%?%'". What version of the product are you using? On what operating system? I use the last SVN version on the iPhone OS 3.0 (but it did the same thing with 2.2.1).
  • Jun 24, 2009
    issue 11 (changed 'stringforcolumn' behavior with iPhone OS3) commented on by gusmueller   -   Any sample code for this yet?
    Any sample code for this yet?
  • Jun 24, 2009
    issue 11 (changed 'stringforcolumn' behavior with iPhone OS3) commented on by MarqueIV   -   Wanted to clarify what is happening. I created a view that uses multiple joins and in my particular case, I also aliased the table names to make it easier and because in some cases I have to join multiple times against the same table so I have no choice but to use aliases. For instance, when I create a view like this... Create View if not exists SomeView Select T1.FieldA, T2.FieldB From LongTableNameOne as T1 Join LongTableNameTwo as T2 on T2.ParentID = T1.ID ... and then create a FMResultSet using executeQuery and passing it a 'Select * From SomeView', when I try and access a column by name--for instance 'FieldA'--I get a 'Column Not Found' error. BUT... if I alias the column names in the first part of the 'select' statement, even using the exact same names as the columns like this... Select T1.FieldA as FieldA, T2.FieldB as FieldB... ...then the column is found no problem. Now I don't have time to check if this is because its a view, because I'm using table aliases or what, but I do know that my view is correct as when I examine it directly by executing code against the database using third-party GUI tools, etc., the columns do come back as expected even without the column aliases leaving me to believe that its an issue in the implementation of FMDatabase or within the iPhone's implementation of SQLite. Again, I do have a workaround--just alias the columns--but it is a bit of a pain considering my join has close to 30-40 fields. (It's joining seven tables) Mark
    Wanted to clarify what is happening. I created a view that uses multiple joins and in my particular case, I also aliased the table names to make it easier and because in some cases I have to join multiple times against the same table so I have no choice but to use aliases. For instance, when I create a view like this... Create View if not exists SomeView Select T1.FieldA, T2.FieldB From LongTableNameOne as T1 Join LongTableNameTwo as T2 on T2.ParentID = T1.ID ... and then create a FMResultSet using executeQuery and passing it a 'Select * From SomeView', when I try and access a column by name--for instance 'FieldA'--I get a 'Column Not Found' error. BUT... if I alias the column names in the first part of the 'select' statement, even using the exact same names as the columns like this... Select T1.FieldA as FieldA, T2.FieldB as FieldB... ...then the column is found no problem. Now I don't have time to check if this is because its a view, because I'm using table aliases or what, but I do know that my view is correct as when I examine it directly by executing code against the database using third-party GUI tools, etc., the columns do come back as expected even without the column aliases leaving me to believe that its an issue in the implementation of FMDatabase or within the iPhone's implementation of SQLite. Again, I do have a workaround--just alias the columns--but it is a bit of a pain considering my join has close to 30-40 fields. (It's joining seven tables) Mark
  • Jun 24, 2009
    issue 11 (changed 'stringforcolumn' behavior with iPhone OS3) commented on by MarqueIV   -   Wanted to clarify what is happening. I created a view that uses multiple joins and in my particular case, I alias the tablenames to make it easier. For instance, when I create a view like this... Create View if not exists SomeView Select T1.FieldA, T2.FieldB From LongTableNameOne as T1 Join LongTableNameTwo as T2 on T2.ParentID = T1.ID ... and then create a FMResultSet using executeQuery and passing it a 'Select * From SomeView', when I use the following syntax to access a column in the results by name (for instance 'FieldA') I get a 'Column Not Found' error. BUT... if I alias the column names in the first part of the 'select' statement, even using the exact same names as the columns like this... Select T1.FieldA as FieldA, T2.FieldB as FieldB... ...then the column is found no problem. Now I don't have time to check if this is because its a view, because I'm using table aliases or what, but I do know that my view is correct as when I examine it directly by executing code against the database using third-party GUI tools, etc., the columns do come back as expected even without the column aliases leaving me to believe that its an issue in the implementation of FMDatabase or within the iPhone's implementation of SQLite. Again, I do have a workaround--just alias the columns--but it is a bit of a pain considering my join has close to 30-40 fields. (It's joining seven tables) Mark
    Wanted to clarify what is happening. I created a view that uses multiple joins and in my particular case, I alias the tablenames to make it easier. For instance, when I create a view like this... Create View if not exists SomeView Select T1.FieldA, T2.FieldB From LongTableNameOne as T1 Join LongTableNameTwo as T2 on T2.ParentID = T1.ID ... and then create a FMResultSet using executeQuery and passing it a 'Select * From SomeView', when I use the following syntax to access a column in the results by name (for instance 'FieldA') I get a 'Column Not Found' error. BUT... if I alias the column names in the first part of the 'select' statement, even using the exact same names as the columns like this... Select T1.FieldA as FieldA, T2.FieldB as FieldB... ...then the column is found no problem. Now I don't have time to check if this is because its a view, because I'm using table aliases or what, but I do know that my view is correct as when I examine it directly by executing code against the database using third-party GUI tools, etc., the columns do come back as expected even without the column aliases leaving me to believe that its an issue in the implementation of FMDatabase or within the iPhone's implementation of SQLite. Again, I do have a workaround--just alias the columns--but it is a bit of a pain considering my join has close to 30-40 fields. (It's joining seven tables) Mark
  • Jun 23, 2009
    issue 11 (changed 'stringforcolumn' behavior with iPhone OS3) commented on by MarqueIV   -   I noticed the exact same issue when using a view. I have to use column aliases when creating the view or I get the same 'column not found' error as described above. Adding aliases fixed the issue for me.
    I noticed the exact same issue when using a view. I have to use column aliases when creating the view or I get the same 'column not found' error as described above. Adding aliases fixed the issue for me.
  • Jun 23, 2009
    issue 11 (changed 'stringforcolumn' behavior with iPhone OS3) commented on by MarqueIV   -   I noticed the exact same issue when using a view. I have to use column aliases when creating the view or I get the same 'not ound' error as described above.
    I noticed the exact same issue when using a view. I have to use column aliases when creating the view or I get the same 'not ound' error as described above.
  • Jun 17, 2009
    issue 11 (changed 'stringforcolumn' behavior with iPhone OS3) commented on by gusmueller   -   Some sample code which shows the bad behavior, along the lines of the tests in the fmdb.m file would work-it would be easier for me to add & test to the official release. thanks, -gus
    Some sample code which shows the bad behavior, along the lines of the tests in the fmdb.m file would work-it would be easier for me to add & test to the official release. thanks, -gus
  • Jun 16, 2009
    issue 11 (changed 'stringforcolumn' behavior with iPhone OS3) reported by saywake   -   What steps will reproduce the problem? 1. Execute a query from two tables such as "select table1.field1, table2.field2 from table1, table2 where ..." 2. reference a result column with 'table.field' syntax as in 'var = [rs stringforcolumn(@"table1.field1")' 3. column not found error is logged to console What is the expected output? What do you see instead? Works fine in iPhone OS 2.2.1. In the new release (GM Seed), column is returned as not found. If I change the query to be "select table1.field1 AS vNAME, table2.field2 from table1, table2 where ...", then I can do stringforcolumn(@"vNAME"). That works in both 2.2.1 and 3.0 of iPhone OS What version of the product are you using? On what operating system? See above Please provide any additional information below. I have sample code if the above is not clear enough
    What steps will reproduce the problem? 1. Execute a query from two tables such as "select table1.field1, table2.field2 from table1, table2 where ..." 2. reference a result column with 'table.field' syntax as in 'var = [rs stringforcolumn(@"table1.field1")' 3. column not found error is logged to console What is the expected output? What do you see instead? Works fine in iPhone OS 2.2.1. In the new release (GM Seed), column is returned as not found. If I change the query to be "select table1.field1 AS vNAME, table2.field2 from table1, table2 where ...", then I can do stringforcolumn(@"vNAME"). That works in both 2.2.1 and 3.0 of iPhone OS What version of the product are you using? On what operating system? See above Please provide any additional information below. I have sample code if the above is not clear enough
  • Jun 14, 2009
    r143 (fixed up databaseWithPath: to use [self alloc], which helps ...) committed by gusmueller   -   fixed up databaseWithPath: to use [self alloc], which helps subclassers
    fixed up databaseWithPath: to use [self alloc], which helps subclassers
  • May 23, 2009
    issue 10 (FMDB thinks SQLITE_DONE and SQLITE_ROW are errors) Status changed by gusmueller   -   Thanks- I've changed up your patch a little bit, but the fix is in.
    Status: Fixed
    Thanks- I've changed up your patch a little bit, but the fix is in.
    Status: Fixed
  • May 23, 2009
    r142 ( Added: - (id)executeQuery:(NSString *)sql withArgume...) committed by gusmueller   -   Added: - (id)executeQuery:(NSString *)sql withArgumentsInArray:(NSArray *)arguments; - (BOOL) executeUpdate:(NSString*)sql withArgumentsInArray:(NSArray *)arguments; thanks to code from Phong Long. Fix to FMResultSet's - (BOOL) hadError, as it was returning true for SQLITE_ROW & SQLITE_DONE, which aren't actually errors. Added: - (BOOL) hasAnotherRow; which lets you know if there is another row waiting in the result set. Thanks to code from Dave DeLong.
    Added: - (id)executeQuery:(NSString *)sql withArgumentsInArray:(NSArray *)arguments; - (BOOL) executeUpdate:(NSString*)sql withArgumentsInArray:(NSArray *)arguments; thanks to code from Phong Long. Fix to FMResultSet's - (BOOL) hadError, as it was returning true for SQLITE_ROW & SQLITE_DONE, which aren't actually errors. Added: - (BOOL) hasAnotherRow; which lets you know if there is another row waiting in the result set. Thanks to code from Dave DeLong.
  • May 21, 2009
    issue 10 (FMDB thinks SQLITE_DONE and SQLITE_ROW are errors) reported by davedelong   -   What steps will reproduce the problem? Running the following code will print two log statements: FMDatabase * db = [FMDatabase databaseWithPath:@"/tmp/fmdbtest.db"]; if (![db open]) { [pool drain]; return 1; } if ([db executeUpdate:@"CREATE TABLE test (name TEXT PRIMARY KEY)"]) { [db executeUpdate:@"INSERT INTO test VALUES ('foo1')"]; [db executeUpdate:@"INSERT INTO test VALUES ('foo2')"]; } FMResultSet * res = [db executeQuery:@"SELECT * FROM test"]; while ([res next]) { if ([db hadError]) { NSLog(@"OH NOES! WHAT HAPPENED??? %@ - %d", [db lastErrorMessage], [db lastErrorCode]); } } [db close]; What is the expected output? What do you see instead? The expected output should be nothing. Instead, I get an error code of 100 (SQLITE_ROW, indicating "sqlite3_step() has another row ready"), and an error message of "not an error". Since SQLite itself is saying "not an error", it seems pretty incongruous for [db hadError] to return true. What version of the product are you using? On what operating system? I am using the latest version of FMDB (revision 141). Please provide any additional information below. This can easily be fixed by making the -[FMDatabase hadError] method to read: - (BOOL) hadError { return ([self lastErrorCode] != SQLITE_OK && [self lastErrorCode] != SQLITE_DONE && [self lastErrorCode] != SQLITE_ROW); } Cheers, Dave DeLong
    What steps will reproduce the problem? Running the following code will print two log statements: FMDatabase * db = [FMDatabase databaseWithPath:@"/tmp/fmdbtest.db"]; if (![db open]) { [pool drain]; return 1; } if ([db executeUpdate:@"CREATE TABLE test (name TEXT PRIMARY KEY)"]) { [db executeUpdate:@"INSERT INTO test VALUES ('foo1')"]; [db executeUpdate:@"INSERT INTO test VALUES ('foo2')"]; } FMResultSet * res = [db executeQuery:@"SELECT * FROM test"]; while ([res next]) { if ([db hadError]) { NSLog(@"OH NOES! WHAT HAPPENED??? %@ - %d", [db lastErrorMessage], [db lastErrorCode]); } } [db close]; What is the expected output? What do you see instead? The expected output should be nothing. Instead, I get an error code of 100 (SQLITE_ROW, indicating "sqlite3_step() has another row ready"), and an error message of "not an error". Since SQLite itself is saying "not an error", it seems pretty incongruous for [db hadError] to return true. What version of the product are you using? On what operating system? I am using the latest version of FMDB (revision 141). Please provide any additional information below. This can easily be fixed by making the -[FMDatabase hadError] method to read: - (BOOL) hadError { return ([self lastErrorCode] != SQLITE_OK && [self lastErrorCode] != SQLITE_DONE && [self lastErrorCode] != SQLITE_ROW); } Cheers, Dave DeLong
  • May 10, 2009
    issue 8 (asm) commented on by aashram   -   Thats Correct. When I use the GroceryGetter FMDB App it now builds ok but when In the simulator the addition of of records does not work.
    Thats Correct. When I use the GroceryGetter FMDB App it now builds ok but when In the simulator the addition of of records does not work.
  • May 10, 2009
    issue 9 (use sqlite3_prepare_v2?) Status changed by gusmueller   -  
    Status: Fixed
    Status: Fixed
  • May 10, 2009
    issue 8 (asm) Status changed by gusmueller   -   Thanks for the fix- I've got it added.
    Status: Fixed
    Thanks for the fix- I've got it added.
    Status: Fixed
  • May 10, 2009
    r141 (replaced sqlite3_prepare calls with sqlite3_prepare_v2, sinc...) committed by gusmueller   -   replaced sqlite3_prepare calls with sqlite3_prepare_v2, since it's shiny and new. Now making sure not to call any assembly if on the iphone (asm{ trap }). Tested on 10.6. It works. Not that I didn't expect it not to- but you never know…
    replaced sqlite3_prepare calls with sqlite3_prepare_v2, since it's shiny and new. Now making sure not to call any assembly if on the iphone (asm{ trap }). Tested on 10.6. It works. Not that I didn't expect it not to- but you never know…
  • May 10, 2009
    issue 8 (asm) commented on by adrian.burgess   -   I'm guessing you're building for iPhone on a PowerPC? If so, the fix is to change: #ifdef __BIG_ENDIAN__ to #if defined(__BIG_ENDIAN__) && !TARGET_IPHONE_SIMULATOR
    I'm guessing you're building for iPhone on a PowerPC? If so, the fix is to change: #ifdef __BIG_ENDIAN__ to #if defined(__BIG_ENDIAN__) && !TARGET_IPHONE_SIMULATOR
  • May 09, 2009
    issue 9 (use sqlite3_prepare_v2?) reported by flyingmeatsupport   -   http://www.sqlite.org/capi3ref.html#sqlite3_prepare "When an error occurs, sqlite3_step() will return one of the detailed error codes or extended error codes. The legacy behavior was that sqlite3_step() would only return a generic SQLITE_ERROR result code and you would have to make a second call to sqlite3_reset() in order to find the underlying cause of the problem. With the "v2" prepare interfaces, the underlying reason for the error is returned immediately."
    http://www.sqlite.org/capi3ref.html#sqlite3_prepare "When an error occurs, sqlite3_step() will return one of the detailed error codes or extended error codes. The legacy behavior was that sqlite3_step() would only return a generic SQLITE_ERROR result code and you would have to make a second call to sqlite3_reset() in order to find the underlying cause of the problem. With the "v2" prepare interfaces, the underlying reason for the error is returned immediately."
  • May 05, 2009
    issue 8 (asm) commented on by aashram   -   I am running xcode 3.1.2 on a powermac G5 Quad, I cannot get FMDB to work at all. I have tried downloading example projects that us FMDB and they work fine on my macbook pro which is running Xcode 3.1.2 but I get the above error when using the G5 Quad
    I am running xcode 3.1.2 on a powermac G5 Quad, I cannot get FMDB to work at all. I have tried downloading example projects that us FMDB and they work fine on my macbook pro which is running Xcode 3.1.2 but I get the above error when using the G5 Quad
  • May 05, 2009
    r140 (Just one more tiny tiny test. ) committed by gusmueller   -   Just one more tiny tiny test.
    Just one more tiny tiny test.
  • May 05, 2009
    r139 ( stringForColumnIndex, stringForColumn, dataForColumnInde...) committed by gusmueller   -   stringForColumnIndex, stringForColumn, dataForColumnIndex, dataForColumn, dataNoCopyForColumnIndex, and dataNoCopyForColumn now return nil if a null value was inserted into its table row. dateForColumnIndex already did this. Also added the following methods to test if a column is null or not: - (BOOL) columnIndexIsNull:(int)columnIdx - (BOOL) columnIsNull:(NSString*)columnName And finally, just general code cleanup + refactoring. Happy Cinco de Mayo!
    stringForColumnIndex, stringForColumn, dataForColumnIndex, dataForColumn, dataNoCopyForColumnIndex, and dataNoCopyForColumn now return nil if a null value was inserted into its table row. dateForColumnIndex already did this. Also added the following methods to test if a column is null or not: - (BOOL) columnIndexIsNull:(int)columnIdx - (BOOL) columnIsNull:(NSString*)columnName And finally, just general code cleanup + refactoring. Happy Cinco de Mayo!
  • May 05, 2009
    issue 8 (asm) commented on by ccgus74   -   What version of Xcode are you using? The call is there to break into the debugger.
    What version of Xcode are you using? The call is there to break into the debugger.
  • Apr 30, 2009
    issue 8 (asm) reported by aashram   -   What steps will reproduce the problem? 1. Imported fmdb into my project running on a G5 Quad PPC 2. Build What is the expected output? What do you see instead? should just build but I get an error on #ifdef __BIG_ENDIAN__ asm{ trap }; #endif I remove it and it all compiles ok What version of the product are you using? On what operating system? Mac 10.5.6 Please provide any additional information below. When I remove these three lines it builds fine. Why was this added ?
    What steps will reproduce the problem? 1. Imported fmdb into my project running on a G5 Quad PPC 2. Build What is the expected output? What do you see instead? should just build but I get an error on #ifdef __BIG_ENDIAN__ asm{ trap }; #endif I remove it and it all compiles ok What version of the product are you using? On what operating system? Mac 10.5.6 Please provide any additional information below. When I remove these three lines it builds fine. Why was this added ?
  • Apr 27, 2009
    r138 (added ignore on a build directory) committed by gusmueller   -   added ignore on a build directory
    added ignore on a build directory
  • Apr 27, 2009
    r137 (Added some svn ignores) committed by gusmueller   -   Added some svn ignores
    Added some svn ignores
  • Apr 27, 2009
    r136 (added columnNameForIndex: to FMResultSet which returns the c...) committed by gusmueller   -   added columnNameForIndex: to FMResultSet which returns the column name for the given index.
    added columnNameForIndex: to FMResultSet which returns the column name for the given index.
  • Apr 27, 2009
    issue 7 (I'd like to see a 'nameForColumnIndex' method in FMResultSet) Status changed by gusmueller   -   This is added in the next commit... once I get svn to stop freaking out on me.
    Status: Done
    This is added in the next commit... once I get svn to stop freaking out on me.
    Status: Done
  • Apr 27, 2009
    issue 6 (Calling executeQuery on a closed database crashes app.) Status changed by gusmueller   -   This is as expected.
    Status: WontFix
    This is as expected.
    Status: WontFix
  • Apr 26, 2009
    issue 7 (I'd like to see a 'nameForColumnIndex' method in FMResultSet) reported by wou...@human-software.nl   -   It is possible to query a result set by fieldName or by fieldIndex. If I make a generic database viewer, it is usefull to get the field name for a column index. There is a method: - (int) columnIndexForName:(NSString*)columnName But not the other way around.
    It is possible to query a result set by fieldName or by fieldIndex. If I make a generic database viewer, it is usefull to get the field name for a column index. There is a method: - (int) columnIndexForName:(NSString*)columnName But not the other way around.
  • Apr 26, 2009
    issue 6 (Calling executeQuery on a closed database crashes app.) reported by wou...@human-software.nl   -   This will cause the following: Exception Type: EXC_BAD_ACCESS (SIGBUS) Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000030 Crashed Thread: 0
    This will cause the following: Exception Type: EXC_BAD_ACCESS (SIGBUS) Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000030 Crashed Thread: 0
 
Hosted by Google Code