subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gst...@apache.org
Subject svn commit: r933969 - in /subversion/trunk: build.conf subversion/libsvn_subr/internal_statements.sql subversion/libsvn_subr/sqlite.c subversion/libsvn_subr/sqlite.sql
Date Wed, 14 Apr 2010 14:31:55 GMT
Author: gstein
Date: Wed Apr 14 14:31:55 2010
New Revision: 933969

URL: http://svn.apache.org/viewvc?rev=933969&view=rev
Log:
Rename "sqlite.sql" to "internal_statements.sql"

Fix an old bug in svn_sqlite__get_statement(!!).

* subversion/libsvn_subr/sqlite.sql: renamed to ...
* subversion/libsvn_subr/internal_statements.sql: ... this

* build.conf: track rename

* subversion/libsvn_subr/sqlite.c:
  (): adjust header includes for rename. use new renamed macro, and place
    the results into 'internal_statements' so that params and locals named
    'statements' do not shadow this global.
  (svn_sqlite__hotcopy): track rename to 'internal_statements'
  (svn_sqlite__get_statement): remove stray semicolon which caused the
    statements to ALWAYS be reset. found by compiler warning that the
    following 'return' statement would never be executed. (woah)

Added:
    subversion/trunk/subversion/libsvn_subr/internal_statements.sql
      - copied unchanged from r933957, subversion/trunk/subversion/libsvn_subr/sqlite.sql
Removed:
    subversion/trunk/subversion/libsvn_subr/sqlite.sql
Modified:
    subversion/trunk/build.conf
    subversion/trunk/subversion/libsvn_subr/sqlite.c

Modified: subversion/trunk/build.conf
URL: http://svn.apache.org/viewvc/subversion/trunk/build.conf?rev=933969&r1=933968&r2=933969&view=diff
==============================================================================
--- subversion/trunk/build.conf (original)
+++ subversion/trunk/build.conf Wed Apr 14 14:31:55 2010
@@ -381,10 +381,10 @@ path = subversion/libsvn_wc
 sources = wc-checks.sql
 
 [subr_sqlite]
-description = Subversion SQLite interface
+description = Internal statements for SQLite interface
 type = sql-header
 path = subversion/libsvn_subr
-sources = sqlite.sql
+sources = internal_statements.sql
 
 
 # ----------------------------------------------------------------------------

Modified: subversion/trunk/subversion/libsvn_subr/sqlite.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/sqlite.c?rev=933969&r1=933968&r2=933969&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/sqlite.c (original)
+++ subversion/trunk/subversion/libsvn_subr/sqlite.c Wed Apr 14 14:31:55 2010
@@ -28,7 +28,8 @@
 #include "svn_io.h"
 #include "svn_dirent_uri.h"
 #include "svn_checksum.h"
-#include "sqlite.h"
+
+#include "internal_statements.h"
 
 #include "private/svn_sqlite.h"
 #include "svn_private_config.h"
@@ -49,7 +50,8 @@
   #include <sqlite3.h>
 #endif
 
-SQLITE_SQL_DECLARE_STATEMENTS(statements);
+INTERNAL_STATEMENTS_SQL_DECLARE_STATEMENTS(internal_statements);
+
 
 #ifdef SQLITE3_DEBUG
 /* An sqlite query execution callback. */
@@ -143,7 +145,7 @@ svn_sqlite__get_statement(svn_sqlite__st
 
   *stmt = db->prepared_stmts[stmt_idx];
 
-  if ((*stmt)->needs_reset);
+  if ((*stmt)->needs_reset)
     return svn_error_return(svn_sqlite__reset(*stmt));
 
   return SVN_NO_ERROR;
@@ -984,7 +986,8 @@ svn_sqlite__hotcopy(const char *src_path
      experimental) and the copy would be done in chunks with the lock
      released between chunks. */
   SVN_ERR(svn_sqlite__open(&db, src_path, svn_sqlite__mode_readonly,
-                           statements, 0, NULL, scratch_pool, scratch_pool));
+                           internal_statements, 0, NULL,
+                           scratch_pool, scratch_pool));
   SVN_ERR(svn_sqlite__get_statement(&stmt, db, STMT_DUMMY_SELECT_FOR_BACKUP));
   SVN_ERR(svn_sqlite__step_row(stmt));
   SVN_ERR(svn_io_copy_file(src_path, dst_path, TRUE, scratch_pool));



Mime
View raw message