39
39
40
40
41
41
sqlite3_stmt * stmt = NULL ;
42
- // CK static MYSQL_BIND lookup_param[4], lookup_result[5];
43
- // CK static MYSQL_BIND add_param[4], put_param[5];
44
42
45
43
/*
46
44
* Prepared statement parameters
@@ -248,7 +246,7 @@ void cnid_sqlite_close(struct _cnid_db *cdb)
248
246
int cnid_sqlite_update (struct _cnid_db * cdb ,
249
247
cnid_t id ,
250
248
const struct stat * st ,
251
- const cnid_t did , char * name , size_t len )
249
+ cnid_t did , const char * name , size_t len )
252
250
{
253
251
EC_INIT ;
254
252
CNID_sqlite_private * db ;
@@ -320,7 +318,7 @@ int cnid_sqlite_update(struct _cnid_db *cdb,
320
318
321
319
cnid_t cnid_sqlite_lookup (struct _cnid_db * cdb ,
322
320
const struct stat * st ,
323
- const cnid_t did , char * name , const size_t len )
321
+ cnid_t did , const char * name , size_t len )
324
322
{
325
323
EC_INIT ;
326
324
@@ -530,7 +528,7 @@ cnid_t cnid_sqlite_add(struct _cnid_db *cdb,
530
528
531
529
lastid = sqlite3_last_insert_rowid (db -> cnid_sqlite_con );
532
530
533
- if (lastid > 0xffffffff ) { /* CK this is wrong */
531
+ if (lastid > 0xffffffff ) { /* FIXME: this is wrong */
534
532
/* CNID set is depleted, restart from scratch */
535
533
EC_NEG1 (cnid_sqlite_execute
536
534
(db -> cnid_sqlite_con ,
@@ -563,15 +561,15 @@ cnid_t cnid_sqlite_add(struct _cnid_db *cdb,
563
561
}
564
562
} while (id == CNID_INVALID );
565
563
566
- EC_CLEANUP :
564
+ EC_CLEANUP :
567
565
LOG (log_debug , logtype_cnid , "cnid_sqlite_add: id: %" PRIu32 ,
568
566
ntohl (id ));
569
567
570
568
return id ;
571
569
}
572
570
573
- cnid_t cnid_sqlite_get (struct _cnid_db * cdb , const cnid_t did , char * name ,
574
- const size_t len )
571
+ cnid_t cnid_sqlite_get (struct _cnid_db * cdb , cnid_t did , const char * name ,
572
+ size_t len )
575
573
{
576
574
EC_INIT ;
577
575
CNID_sqlite_private * db ;
@@ -663,7 +661,7 @@ char *cnid_sqlite_resolve(struct _cnid_db *cdb, cnid_t * id, void *buffer,
663
661
if (transient_stmt )
664
662
sqlite3_finalize (transient_stmt );
665
663
666
- #if 0 // handle this CK
664
+ #if 0 // FIXME: handle this
667
665
if (ret != 0 ) {
668
666
* id = CNID_INVALID ;
669
667
return NULL ;
@@ -728,7 +726,7 @@ int cnid_sqlite_find(struct _cnid_db *cdb, const char *name, size_t namelen,
728
726
}
729
727
730
728
cnid_t cnid_sqlite_rebuild_add (struct _cnid_db * cdb , const struct stat * st ,
731
- const cnid_t did , char * name , const size_t len ,
729
+ cnid_t did , const char * name , size_t len ,
732
730
cnid_t hint )
733
731
{
734
732
LOG (log_error , logtype_cnid ,
@@ -775,7 +773,6 @@ static struct _cnid_db *cnid_sqlite_new(struct vol *vol)
775
773
776
774
cdb -> cnid_db_vol = vol ;
777
775
cdb -> cnid_db_flags = CNID_FLAG_PERSISTENT | CNID_FLAG_LAZY_INIT ;
778
-
779
776
cdb -> cnid_add = cnid_sqlite_add ;
780
777
cdb -> cnid_delete = cnid_sqlite_delete ;
781
778
cdb -> cnid_get = cnid_sqlite_get ;
@@ -857,7 +854,7 @@ struct _cnid_db *cnid_sqlite_open(struct cnid_open_args *args)
857
854
strlen (stamp ), SQLITE_STATIC ) );
858
855
859
856
sqlite3_step (transient_stmt );
860
- #if 0 // CK must figure out how to check for failed insert
857
+ #if 0 // FIXME: must figure out how to check for failed insert
861
858
if (sqlite3_step (transient_stmt )) {
862
859
if (mysql_errno (db -> cnid_sqlite_con ) != ER_DUP_ENTRY ) {
863
860
LOG (log_error , logtype_cnid ,
@@ -869,7 +866,7 @@ struct _cnid_db *cnid_sqlite_open(struct cnid_open_args *args)
869
866
#endif
870
867
sqlite3_finalize (transient_stmt );
871
868
872
- #if 0 // CK FIX!
869
+ #if 0 // FIXME
873
870
/*
874
871
* Check whether CNID set overflowed before.
875
872
* If that's the case, in cnid_sqlite_add() we'll ignore the CNID
0 commit comments