AscendingCreations / r2d2_odbc_api

ODBC support for the r2d2 connection pool Via odbc-api Based on https://github.com/Koka/r2d2-odbc
Apache License 2.0
1 stars 2 forks source link

thread 'r2d2-worker-0' panicked at 'called `Result::unwrap()` on an `Err` value: FailedSettingConnectionPooling', /home/bbigras/.cargo/registry/src/github.com-1ecc6299db9ec823/r2d2_odbc_api-0.1.3/src/lib.rs:35:81 #2

Closed bbigras closed 2 years ago

bbigras commented 2 years ago

I'm trying to switch from r2d2_odbc to r2d2_odbc_api and I got this error while calling ODBCConnectionManager::new((conn_str).

stack backtrace:
   0: rust_begin_unwind
             at /rustc/9ad5d82f822b3cb67637f11be2e65c5662b66ec0/library/std/src/panicking.rs:577:5
   1: core::panicking::panic_fmt
             at /rustc/9ad5d82f822b3cb67637f11be2e65c5662b66ec0/library/core/src/panicking.rs:110:14
   2: core::result::unwrap_failed
             at /rustc/9ad5d82f822b3cb67637f11be2e65c5662b66ec0/library/core/src/result.rs:1690:5
   3: core::result::Result<T,E>::unwrap
             at /rustc/9ad5d82f822b3cb67637f11be2e65c5662b66ec0/library/core/src/result.rs:1018:23
   4: <r2d2_odbc_api::ENV as core::ops::deref::Deref>::deref::__static_ref_initialize
             at /home/bbigras/.cargo/registry/src/github.com-1ecc6299db9ec823/r2d2_odbc_api-0.1.3/src/lib.rs:35:9
   5: core::ops::function::FnOnce::call_once
             at /rustc/9ad5d82f822b3cb67637f11be2e65c5662b66ec0/library/core/src/ops/function.rs:227:5
   6: lazy_static::lazy::Lazy<T>::get::{{closure}}
             at /home/bbigras/.cargo/registry/src/github.com-1ecc6299db9ec823/lazy_static-1.4.0/src/inline_lazy.rs:31:29
   7: std::sync::once::Once::call_once::{{closure}}
             at /rustc/9ad5d82f822b3cb67637f11be2e65c5662b66ec0/library/std/src/sync/once.rs:269:41
   8: std::sync::once::Once::call_inner
             at /rustc/9ad5d82f822b3cb67637f11be2e65c5662b66ec0/library/std/src/sync/once.rs:426:21
   9: std::sync::once::Once::call_once
             at /rustc/9ad5d82f822b3cb67637f11be2e65c5662b66ec0/library/std/src/sync/once.rs:269:9
  10: lazy_static::lazy::Lazy<T>::get
             at /home/bbigras/.cargo/registry/src/github.com-1ecc6299db9ec823/lazy_static-1.4.0/src/inline_lazy.rs:30:9
  11: <r2d2_odbc_api::ENV as core::ops::deref::Deref>::deref::__stability
             at /home/bbigras/.cargo/registry/src/github.com-1ecc6299db9ec823/lazy_static-1.4.0/src/lib.rs:142:21
  12: <r2d2_odbc_api::ENV as core::ops::deref::Deref>::deref
             at /home/bbigras/.cargo/registry/src/github.com-1ecc6299db9ec823/lazy_static-1.4.0/src/lib.rs:144:17
  13: <r2d2_odbc_api::ODBCConnectionManager as r2d2::ManageConnection>::connect
             at /home/bbigras/.cargo/registry/src/github.com-1ecc6299db9ec823/r2d2_odbc_api-0.1.3/src/lib.rs:106:20
  14: r2d2::add_connection::inner::{{closure}}
             at /home/bbigras/.cargo/registry/src/github.com-1ecc6299db9ec823/r2d2-0.8.9/src/lib.rs:241:24
  15: scheduled_thread_pool::thunk::Thunk<(),R>::new::{{closure}}
             at /home/bbigras/.cargo/registry/src/github.com-1ecc6299db9ec823/scheduled-thread-pool-0.2.5/src/thunk.rs:20:35
  16: <F as scheduled_thread_pool::thunk::Invoke<A,R>>::invoke
             at /home/bbigras/.cargo/registry/src/github.com-1ecc6299db9ec823/scheduled-thread-pool-0.2.5/src/thunk.rs:50:9
  17: scheduled_thread_pool::thunk::Thunk<A,R>::invoke
             at /home/bbigras/.cargo/registry/src/github.com-1ecc6299db9ec823/scheduled-thread-pool-0.2.5/src/thunk.rs:35:9
  18: scheduled_thread_pool::Worker::run_job
             at /home/bbigras/.cargo/registry/src/github.com-1ecc6299db9ec823/scheduled-thread-pool-0.2.5/src/lib.rs:364:33
  19: scheduled_thread_pool::Worker::run::{{closure}}
             at /home/bbigras/.cargo/registry/src/github.com-1ecc6299db9ec823/scheduled-thread-pool-0.2.5/src/lib.rs:326:61
  20: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/9ad5d82f822b3cb67637f11be2e65c5662b66ec0/library/core/src/panic/unwind_safe.rs:271:9
  21: std::panicking::try::do_call
             at /rustc/9ad5d82f822b3cb67637f11be2e65c5662b66ec0/library/std/src/panicking.rs:485:40
[...]

odbc-api = "0.33" r2d2_odbc_api = "0.1.3"

pacman82 commented 2 years ago

TryFromIntError is not emmitted by odbc-api.

genusistimelord commented 2 years ago

@pacman82 ahh ok thanks for taking the time to quickly look at reply as i did not know if it was returned or not from odbc-api. Ill get with him to closer examine what he is doing to get that error.

genusistimelord commented 2 years ago

fixed in latest Pooling Branch. will be merged once things are better sorted out.