diff --git a/src/backends/firebird/statement.cpp b/src/backends/firebird/statement.cpp index 47dcbfcac..5eea3e50a 100644 --- a/src/backends/firebird/statement.cpp +++ b/src/backends/firebird/statement.cpp @@ -579,7 +579,7 @@ long long firebird_statement_backend::get_affected_rows() // type, its value length in bytes and the value itself. long long row_count = 0; - for ( char* p = sql_rec_buf; p < sql_rec_buf + length; ) + for ( char* p = sql_rec_buf; !row_count && p < sql_rec_buf + length; ) { switch (*p++) { diff --git a/src/backends/firebird/test/test-firebird.cpp b/src/backends/firebird/test/test-firebird.cpp index a06ceee50..3d3d5b501 100644 --- a/src/backends/firebird/test/test-firebird.cpp +++ b/src/backends/firebird/test/test-firebird.cpp @@ -1230,9 +1230,6 @@ struct TableCreator3 : public tests::table_creator_base TableCreator3(session & sql) : tests::table_creator_base(sql) { - // CommonTest uses lower-case column names, - // so we need to enforce such names here. - // That's why column names are enclosed in "" sql << "create table soci_test(name varchar(100) not null, " "phone varchar(15))"; sql.commit(); @@ -1240,6 +1237,17 @@ struct TableCreator3 : public tests::table_creator_base } }; +struct TableCreator4 : public tests::table_creator_base +{ + TableCreator4(session & sql) + : tests::table_creator_base(sql) + { + sql << "create table soci_test(val integer)"; + sql.commit(); + sql.begin(); + } +}; + class test_context : public tests::test_context_base { public: @@ -1263,6 +1271,11 @@ class test_context : public tests::test_context_base return new TableCreator3(s); } + tests::table_creator_base* table_creator_4(session& s) const + { + return new TableCreator4(s); + } + std::string to_date_time(std::string const &datdt_string) const { return "'" + datdt_string + "'";