Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

query cann't return dataframe from MariaDB #216

Closed
olegshtch opened this issue Nov 26, 2018 · 1 comment
Closed

query cann't return dataframe from MariaDB #216

olegshtch opened this issue Nov 26, 2018 · 1 comment

Comments

@olegshtch
Copy link

When I trying to get data from MySQL I got error:

> using ODBC
> dsnMy = ODBC.DSN("DSN=...;Driver=MySQL;uid=...;pwd=...", prompt=false)
> dfMy = ODBC.query(dsnMy, "SELECT 1")
ERROR: BoundsError: attempt to access 1-element Array{Union{Missing, Int64},1} at index [2]
Stacktrace:
 [1] setindex! at .\array.jl:769 [inlined]
 [2] add! at C:\Users\oleg_schelicalnov\.julia\packages\Tables\pzdWQ\src\fallbacks.jl:59 [inlined]
 [3] macro expansion at C:\Users\oleg_schelicalnov\.julia\packages\Tables\pzdWQ\src\utils.jl:54 [inlined]
 [4] eachcolumn at C:\Users\oleg_schelicalnov\.julia\packages\Tables\pzdWQ\src\utils.jl:46 [inlined]
 [5] buildcolumns at C:\Users\oleg_schelicalnov\.julia\packages\Tables\pzdWQ\src\fallbacks.jl:67 [inlined]
 [6] columns at C:\Users\oleg_schelicalnov\.julia\packages\Tables\pzdWQ\src\fallbacks.jl:121 [inlined]
 [7] DataFrame(::ODBC.Query{1,NamedTuple{(:f,),Tuple{Union{Missing, Int64}}},Tuple{Array{Union{Missing, Int64},1}}}) at C:\Users\oleg_schelicalnov\.julia\packages\DataFrames\1PqZ3\src\other\tables.jl:17
 [8] #query#14(::Bool, ::Bool, ::Dict{Int64,Function}, ::Function, ::ODBC.DSN, ::String, ::Type{DataFrame}) at C:\Users\oleg_schelicalnov\.julia\packages\ODBC\KFiOK\src\Query.jl:278
 [9] query at C:\Users\oleg_schelicalnov\.julia\packages\ODBC\KFiOK\src\Query.jl:273 [inlined]
 [10] query(::ODBC.DSN, ::String) at C:\Users\oleg_schelicalnov\.julia\packages\ODBC\KFiOK\src\Query.jl:264
 [11] top-level scope at none:0

MariaDB server: 5.5.56-MariaDB
MariaDB ODBC 3.0 driver: 3.00.05.00
OS: Windows x64

For same query at MS SQL Server I got:

julia> df
1×1 DataFrame
│ Row │        │
│     │ Int32⍰ │
├─────┼────────┤
│ 11
@quinnj
Copy link
Member

quinnj commented May 23, 2020

This should be fixed on master

@quinnj quinnj closed this as completed May 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants