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

MiqSqlite3DB::MiqSqlite3#table_names raises an exception #205

Closed
agrare opened this issue Nov 4, 2024 · 1 comment · Fixed by #204
Closed

MiqSqlite3DB::MiqSqlite3#table_names raises an exception #205

agrare opened this issue Nov 4, 2024 · 1 comment · Fixed by #204
Assignees
Labels

Comments

@agrare
Copy link
Member

agrare commented Nov 4, 2024

>> require 'db/MiqSqlite/MiqSqlite3'
bin/console:14: warning: ostruct was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.5.0.
You can add ostruct to your Gemfile or gemspec to silence this warning.
=> true
>> db = MiqSqlite3DB::MiqSqlite3.new('/var/lib/rpm/rpmdb.sqlite')
=> 
#<MiqSqlite3DB::MiqSqlite3:0x00007f2b5ecbb368
...
>> db.table_names
/home/grare/adam/src/manageiq/manageiq-smartstate/lib/db/MiqSqlite/MiqSqlite3Table.rb:68:in `decodeSchema': undefined method `[]' for nil (NoMethodError)

      tname = m[1].to_s.chomp
               ^^^
	from /home/grare/adam/src/manageiq/manageiq-smartstate/lib/db/MiqSqlite/MiqSqlite3Table.rb:59:in `initialize'
	from /home/grare/adam/src/manageiq/manageiq-smartstate/lib/db/MiqSqlite/MiqSqlite3Table.rb:38:in `new'
	from /home/grare/adam/src/manageiq/manageiq-smartstate/lib/db/MiqSqlite/MiqSqlite3Table.rb:38:in `block (2 levels) in each'
	from /home/grare/adam/src/manageiq/manageiq-smartstate/lib/db/MiqSqlite/MiqSqlite3Page.rb:91:in `block in each_cell'
	from /home/grare/adam/src/manageiq/manageiq-smartstate/lib/db/MiqSqlite/MiqSqlite3Page.rb:91:in `each'
	from /home/grare/adam/src/manageiq/manageiq-smartstate/lib/db/MiqSqlite/MiqSqlite3Page.rb:91:in `each_cell'
	from /home/grare/adam/src/manageiq/manageiq-smartstate/lib/db/MiqSqlite/MiqSqlite3Table.rb:37:in `block in each'
	from /home/grare/adam/src/manageiq/manageiq-smartstate/lib/db/MiqSqlite/MiqSqlite3Page.rb:84:in `block in each_child'
	from /home/grare/adam/src/manageiq/manageiq-smartstate/lib/db/MiqSqlite/MiqSqlite3Page.rb:91:in `block in each_cell'
	from /home/grare/adam/src/manageiq/manageiq-smartstate/lib/db/MiqSqlite/MiqSqlite3Page.rb:91:in `each'
	from /home/grare/adam/src/manageiq/manageiq-smartstate/lib/db/MiqSqlite/MiqSqlite3Page.rb:91:in `each_cell'
	from /home/grare/adam/src/manageiq/manageiq-smartstate/lib/db/MiqSqlite/MiqSqlite3Page.rb:83:in `each_child'
	from /home/grare/adam/src/manageiq/manageiq-smartstate/lib/db/MiqSqlite/MiqSqlite3Table.rb:35:in `each'
	from /home/grare/adam/src/manageiq/manageiq-smartstate/lib/db/MiqSqlite/MiqSqlite3Table.rb:11:in `table_names'
	from /home/grare/adam/src/manageiq/manageiq-smartstate/lib/db/MiqSqlite/MiqSqlite3.rb:307:in `table_names'
	from (irb):3:in `<main>'
	... 2 levels...
@agrare agrare added the bug label Nov 4, 2024
@agrare agrare self-assigned this Nov 4, 2024
@agrare
Copy link
Member Author

agrare commented Nov 4, 2024

Fixed by #204

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant