Skip to content

Commit 4efa71c

Browse files
committed
recover basic working
1 parent c216e6e commit 4efa71c

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/test_ulog_sqlite.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ int test_multilevel(char *filename) {
152152

153153
struct tm *t;
154154
struct timeval tv;
155-
uls_write_init_with_script(&ctx, "tbl_test_log",
155+
uls_write_init_with_script(&ctx, "test_log",
156156
"CREATE TABLE test_log (date_time TEXT, int_seq INTEGER, float_seq REAL, float_rand REAL, text_rand TEXT)");
157157

158158
int32_t ival;
@@ -432,7 +432,7 @@ int append_db(int argc, char *argv[]) {
432432
// perror("Error");
433433
// return -2;
434434
//}
435-
fp = fopen(argv[2], "w+b");
435+
fp = fopen(argv[2], "r+b");
436436
if (fp == NULL) {
437437
perror ("Open Error:");
438438
fclose(fp);

src/ulog_sqlite.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
- header checksum always checked
2-
- no. of records always less than last pos
3-
- optional to write and check page checksum
4-
- record length should not exceed remaining page size
5-
- column length should not exceed remaining record size
61
/*
72
Sqlite Micro Logger
83
@@ -27,6 +22,11 @@
2722
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2823
See the License for the specific language governing permissions and
2924
limitations under the License.
25+
- header checksum always checked
26+
- no. of records always less than last pos
27+
- optional to write and check page checksum
28+
- record length should not exceed remaining page size
29+
- column length should not exceed remaining record size
3030
*/
3131

3232
#include "ulog_sqlite.h"

0 commit comments

Comments
 (0)