Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Fix bugs in temp database handling introduced by the prevous check-in. (CVS 4288) |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
300038be9368556a29efce7cf3657fab |
User & Date: | drh 2007-08-24 16:29:24.000 |
Context
2007-08-24
| ||
17:52 | Rework the win32 OS driver to use malloc()/free() directly rather than going through the SQLite memory allocation layer. With this change, the complete quick.test script now runs on windows. There are a few errors, but no segfaults. Progress. (CVS 4289) (check-in: 75aad31698 user: drh tags: trunk) | |
16:29 | Fix bugs in temp database handling introduced by the prevous check-in. (CVS 4288) (check-in: 300038be93 user: drh tags: trunk) | |
16:08 | Remove nRef and vfsMutex from the sqlite3_vfs structure. Omit the sqlite3_vfs_release() interface. Less memory allocated for a pager in the common case where the size of the pathname is less than MAX_PATH. (CVS 4287) (check-in: b8451da378 user: drh tags: trunk) | |
Changes
Changes to src/pager.c.
︙ | |||
14 15 16 17 18 19 20 | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | - + | ** The pager is used to access a database disk file. It implements ** atomic commit and rollback through the use of a journal file that ** is separate from the database file. The pager also implements file ** locking to prevent two processes from writing the same database ** file simultaneously, or one process from reading the database while ** another is writing. ** |
︙ | |||
1804 1805 1806 1807 1808 1809 1810 | 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 | + - - + + + + - + - - + - + + + + + + - - - - - + + - - | /* ** Open a temporary file. ** ** Write the file descriptor into *fd. Return SQLITE_OK on success or some ** other error code if we fail. The OS will automatically delete the temporary ** file when it is closed. ** ** If zFilename is 0, then an appropriate temporary filename is |
︙ | |||
1898 1899 1900 1901 1902 1903 1904 | 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 | + + + + - - - + + + - - - - | if( strcmp(zFilename,":memory:")==0 ){ memDb = 1; zPathname[0] = 0; }else #endif { rc = sqlite3OsFullPathname(pVfs, zFilename, zPathname); } }else{ rc = sqlite3OsGetTempName(pVfs, zPathname); } |
︙ | |||
1932 1933 1934 1935 1936 1937 1938 | 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 | - + | pPager->zJournal = &pPager->zDirectory[nPathname+1]; pPager->pVfs = pVfs; memcpy(pPager->zFilename, zPathname, nPathname+1); sqlite3_free(zPathname); /* Open the pager file. */ |
︙ |
Changes to test/pager.test.
1 2 3 4 5 6 7 8 9 10 11 12 13 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | - + | # 2001 September 15 # # The author disclaims copyright to this source code. In place of # a legal notice, here is a blessing: # # May you do good and not evil. # May you find forgiveness for yourself and forgive others. # May you share freely, never taking more than you give. # #*********************************************************************** # This file implements regression tests for SQLite library. The # focus of this script is page cache subsystem. # |
︙ | |||
405 406 407 408 409 410 411 | 405 406 407 408 409 410 411 412 413 414 415 416 417 418 | - | do_test pager-4.6.1 { pager_close [pager_open ptf2.db -15] } {} # Test truncate on an in-memory database is Ok. ifcapable memorydb { do_test pager-4.6.2 { |
︙ |