SQLite

Check-in [28cfdabc47]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Use the database mutex where applicable.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | get-trace
Files: files | file ages | folders
SHA1: 28cfdabc471e132a856292781767777c6390ea3c
User & Date: mistachkin 2015-05-12 23:33:32.287
Context
2015-05-13
04:52
Merge updates from trunk. (Leaf check-in: 10ee36d012 user: mistachkin tags: get-trace)
2015-05-12
23:33
Use the database mutex where applicable. (check-in: 28cfdabc47 user: mistachkin tags: get-trace)
23:31
Fix a couple of typos in comments. (check-in: e908365fae user: mistachkin tags: get-trace)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/main.c.
1771
1772
1773
1774
1775
1776
1777

1778
1779

1780
1781
1782
1783
1784
1785
1786
  void **ppArg
){
#ifdef SQLITE_ENABLE_API_ARMOR
  if( !sqlite3SafetyCheckOk(db) || pxTrace==0 || ppArg==0 ){
    return SQLITE_MISUSE_BKPT;
  }
#endif

  *pxTrace = db->xTrace;
  *ppArg = db->pTraceArg;

  return SQLITE_OK;
}
/*
** Register a profile function.  The pArg from the previously registered 
** profile function is returned.  
**
** A NULL profile function means that no profiling is executes.  A non-NULL







>


>







1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
  void **ppArg
){
#ifdef SQLITE_ENABLE_API_ARMOR
  if( !sqlite3SafetyCheckOk(db) || pxTrace==0 || ppArg==0 ){
    return SQLITE_MISUSE_BKPT;
  }
#endif
  sqlite3_mutex_enter(db->mutex);
  *pxTrace = db->xTrace;
  *ppArg = db->pTraceArg;
  sqlite3_mutex_leave(db->mutex);
  return SQLITE_OK;
}
/*
** Register a profile function.  The pArg from the previously registered 
** profile function is returned.  
**
** A NULL profile function means that no profiling is executes.  A non-NULL
1816
1817
1818
1819
1820
1821
1822

1823
1824

1825
1826
1827
1828
1829
1830
1831
  void **ppArg
){
#ifdef SQLITE_ENABLE_API_ARMOR
  if( !sqlite3SafetyCheckOk(db) || pxProfile==0 || ppArg==0 ){
    return SQLITE_MISUSE_BKPT;
  }
#endif

  *pxProfile = db->xProfile;
  *ppArg = db->pProfileArg;

  return SQLITE_OK;
}
#endif /* SQLITE_OMIT_TRACE */

/*
** Register a function to be invoked when a transaction commits.
** If the invoked function returns non-zero, then the commit becomes a







>


>







1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
  void **ppArg
){
#ifdef SQLITE_ENABLE_API_ARMOR
  if( !sqlite3SafetyCheckOk(db) || pxProfile==0 || ppArg==0 ){
    return SQLITE_MISUSE_BKPT;
  }
#endif
  sqlite3_mutex_enter(db->mutex);
  *pxProfile = db->xProfile;
  *ppArg = db->pProfileArg;
  sqlite3_mutex_leave(db->mutex);
  return SQLITE_OK;
}
#endif /* SQLITE_OMIT_TRACE */

/*
** Register a function to be invoked when a transaction commits.
** If the invoked function returns non-zero, then the commit becomes a