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

Fix #encoding error by oracle_enhanced #2789

Merged
merged 1 commit into from
Dec 21, 2016
Merged

Fix #encoding error by oracle_enhanced #2789

merged 1 commit into from
Dec 21, 2016

Conversation

ojiry
Copy link
Contributor

@ojiry ojiry commented Dec 7, 2016

An error occurs because Oracle cannot omit FROM.

$ bin/rails c
Loading development environment (Rails 5.0.0.1)
ruby 2.3.3 [1] pry(main)> ::ActiveRecord::Base.connection.select_one("SELECT '' AS str;").values.first.encoding
   (2.4ms)  SELECT '' AS str;
ActiveRecord::StatementInvalid: OCIError: ORA-00911: invalid character: SELECT '' AS str;
from stmt.c:243:in oci8lib_230.bundle

In the case of Oracle, I want to execute the following SQL:

$ bin/rails c
Loading development environment (Rails 5.0.0.1)
ruby 2.3.3 [1] pry(main)> ::ActiveRecord::Base.connection.select_one("SELECT dummy FROM DUAL").values.first.encoding
   (0.9ms)  SELECT dummy FROM DUAL
=> #<Encoding:UTF-8>

ref. https://github.com/rsim/oracle-enhanced

@koic
Copy link
Contributor

koic commented Dec 21, 2016

Hi @mshibuya, Thanks for maintenance.

I also want this patch. Is there information necessary for merging?

@mshibuya mshibuya merged commit 34c55b0 into railsadminteam:master Dec 21, 2016
@mshibuya
Copy link
Member

Merged in, thanks!

@koic
Copy link
Contributor

koic commented Dec 21, 2016

Thanks for your merging 💚 💛 ❤️

@ojiry
Copy link
Contributor Author

ojiry commented Dec 21, 2016

Thank you for merged :)

@ojiry ojiry deleted the support_oracle branch December 21, 2016 13:56
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

Successfully merging this pull request may close these issues.

3 participants