Commit 7a9d1be7 authored by matt24smith's avatar matt24smith
Browse files

fix SQL error during database creation

parent e688a06f
Pipeline #4982 passed with stages
in 2 minutes and 36 seconds
__version__ = "1.0.29"
__version__ = "1.0.30"
......@@ -61,11 +61,11 @@ pub async fn main() -> Result<(), Error> {
//n += 1;
/*
if n <= args.start {
continue;
continue;
} else if n > args.end {
break;
break;
} else {
path_arr.push((std::path::PathBuf::from(&args.dbpath), file));
path_arr.push((std::path::PathBuf::from(&args.dbpath), file));
}
*/
path_arr.push((std::path::PathBuf::from(&args.dbpath), file));
......@@ -110,11 +110,9 @@ pub async fn main() -> Result<(), Error> {
elapsed.as_secs_f32() / 60.,
);
let sql = "VACUUM";
let mut conn = get_db_conn(&args.dbpath).expect("get db conn");
let tx = conn.transaction().unwrap();
let _ = tx.execute(&sql, []);
let _ = tx.commit();
let conn = get_db_conn(&args.dbpath).expect("get db conn");
let _v = conn.execute("VACUUM;", []).expect("vacuum");
let _r = conn.close();
Ok(())
}
......@@ -191,7 +191,7 @@ pub async fn decode_insert_msgs(
if positions.len() >= 500000 {
let t = c.transaction().unwrap();
let mstr = epoch_2_dt(*positions[0].epoch.as_ref().unwrap() as i64)
let mstr = epoch_2_dt(*positions[positions.len() - 1].epoch.as_ref().unwrap() as i64)
.format("%Y%m")
.to_string();
let _c = sqlite_createtable_dynamicreport(&t, &mstr).expect("creating dynamic table");
......
......@@ -2,6 +2,12 @@
Changelog
=========
v1.0.30
-------
fix SQL error during database creation
v1.0.29
-------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment