Skip to content

Instantly share code, notes, and snippets.

@stephankaag
Created November 17, 2015 12:17
Show Gist options
  • Save stephankaag/77dd188b163c2ae4c719 to your computer and use it in GitHub Desktop.
Save stephankaag/77dd188b163c2ae4c719 to your computer and use it in GitHub Desktop.
MySQL 5.7 failures
MacBook-Pro-van-Stephan-2:do_mysql stephankaag$ rspec spec/command_spec.rb
DataObjects::Mysql::Command
it should behave like a Command
should be a kind of DataObjects::Command
should respond to #execute_non_query
should respond to #execute_reader
should respond to #set_types
should respond to #to_s
execute_non_query
with an invalid statement
should raise an error on an invalid query
should raise an error with too many binding parameters
should raise an error with too few binding parameters
with a valid statement
should not raise an error with an explicit nil as parameter
with a valid statement and ? inside quotes
should not raise an error
execute_reader
with an invalid reader
should raise an error on an invalid query
should raise an error with too many few binding parameters
should raise an error with too few binding parameters
with a valid reader
should not raise an error with an explicit nil as parameter
with a valid reader and ? inside column alias
should not raise an error
set_types
is invalid when used with a statement
should raise an error when types are set
with an invalid reader
should raise an error with too few types (FAILED - 1)
should raise an error with too many types (FAILED - 2)
with a valid reader
should not raise an error with correct number of types (FAILED - 3)
should also support old style array argument types (FAILED - 4)
should allow subtype types (FAILED - 5)
it should behave like a Command with async
running queries in parallel
should finish within 2 seconds
Failures:
1) DataObjects::Mysql::Command it should behave like a Command set_types with an invalid reader should raise an error with too few types
Failure/Error: expect { @reader.execute_reader("One parameter") }.to raise_error(ArgumentError,
expected ArgumentError with message matching /Field-count mismatch. Expected 1 fields, but the query yielded 2/, got #<DataObjects::SQLError: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''' at line 1 (code: 1064, sql state: 42000, query: SELECT code, name FROM widgets WHERE ad_description = ', uri: mysql://localhost:3306/do_test?zeroDateTimeBehavior=convertToNull)> with backtrace:
# /Users/stephankaag/dev/do/data_objects/lib/data_objects/spec/shared/command_spec.rb:150:in `execute_reader'
# /Users/stephankaag/dev/do/data_objects/lib/data_objects/spec/shared/command_spec.rb:150:in `block (5 levels) in <top (required)>'
# /Users/stephankaag/dev/do/data_objects/lib/data_objects/spec/shared/command_spec.rb:150:in `block (4 levels) in <top (required)>'
Shared Example Group: "a Command" called from ./spec/command_spec.rb:7
# /Users/stephankaag/dev/do/data_objects/lib/data_objects/spec/shared/command_spec.rb:150:in `block (4 levels) in <top (required)>'
2) DataObjects::Mysql::Command it should behave like a Command set_types with an invalid reader should raise an error with too many types
Failure/Error: expect { @reader.execute_reader("One parameter") }.to raise_error(ArgumentError,
expected ArgumentError with message matching /Field-count mismatch. Expected 3 fields, but the query yielded 2/, got #<DataObjects::SQLError: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''' at line 1 (code: 1064, sql state: 42000, query: SELECT code, name FROM widgets WHERE ad_description = ', uri: mysql://localhost:3306/do_test?zeroDateTimeBehavior=convertToNull)> with backtrace:
# /Users/stephankaag/dev/do/data_objects/lib/data_objects/spec/shared/command_spec.rb:156:in `execute_reader'
# /Users/stephankaag/dev/do/data_objects/lib/data_objects/spec/shared/command_spec.rb:156:in `block (5 levels) in <top (required)>'
# /Users/stephankaag/dev/do/data_objects/lib/data_objects/spec/shared/command_spec.rb:156:in `block (4 levels) in <top (required)>'
Shared Example Group: "a Command" called from ./spec/command_spec.rb:7
# /Users/stephankaag/dev/do/data_objects/lib/data_objects/spec/shared/command_spec.rb:156:in `block (4 levels) in <top (required)>'
3) DataObjects::Mysql::Command it should behave like a Command set_types with a valid reader should not raise an error with correct number of types
Failure/Error: @result.close
NoMethodError:
undefined method `close' for nil:NilClass
Shared Example Group: "a Command" called from ./spec/command_spec.rb:7
# /Users/stephankaag/dev/do/data_objects/lib/data_objects/spec/shared/command_spec.rb:169:in `block (4 levels) in <top (required)>'
4) DataObjects::Mysql::Command it should behave like a Command set_types with a valid reader should also support old style array argument types
Failure/Error: @result.close
NoMethodError:
undefined method `close' for nil:NilClass
Shared Example Group: "a Command" called from ./spec/command_spec.rb:7
# /Users/stephankaag/dev/do/data_objects/lib/data_objects/spec/shared/command_spec.rb:177:in `block (4 levels) in <top (required)>'
5) DataObjects::Mysql::Command it should behave like a Command set_types with a valid reader should allow subtype types
Failure/Error: @result.close
NoMethodError:
undefined method `close' for nil:NilClass
Shared Example Group: "a Command" called from ./spec/command_spec.rb:7
# /Users/stephankaag/dev/do/data_objects/lib/data_objects/spec/shared/command_spec.rb:186:in `block (4 levels) in <top (required)>'
Deprecation Warnings:
`expect { }.not_to raise_error(SpecificErrorClass)` is deprecated. Use `expect { }.not_to raise_error` (with no args) instead. Called from /Users/stephankaag/dev/do/data_objects/lib/data_objects/spec/shared/command_spec.rb:52:in `block (4 levels) in <top (required)>'.
`expect { }.not_to raise_error(SpecificErrorClass)` is deprecated. Use `expect { }.not_to raise_error` (with no args) instead. Called from /Users/stephankaag/dev/do/data_objects/lib/data_objects/spec/shared/command_spec.rb:64:in `block (4 levels) in <top (required)>'.
`expect { }.not_to raise_error(SpecificErrorClass)` is deprecated. Use `expect { }.not_to raise_error` (with no args) instead. Called from /Users/stephankaag/dev/do/data_objects/lib/data_objects/spec/shared/command_spec.rb:101:in `block (4 levels) in <top (required)>'.
Too many uses of deprecated '`expect { }.not_to raise_error(SpecificErrorClass)`'. Pass `--deprecation-out` or set `config.deprecation_stream` to a file for full output.
If you need more of the backtrace for any of these deprecations to
identify where to make the necessary changes, you can configure
`config.raise_errors_for_deprecations!`, and it will turn the
deprecation warnings into errors, giving you the full backtrace.
13 deprecation warnings total
Finished in 1.19 seconds
22 examples, 5 failures
Failed examples:
rspec /Users/stephankaag/dev/do/data_objects/lib/data_objects/spec/shared/command_spec.rb:148 # DataObjects::Mysql::Command it should behave like a Command set_types with an invalid reader should raise an error with too few types
rspec /Users/stephankaag/dev/do/data_objects/lib/data_objects/spec/shared/command_spec.rb:154 # DataObjects::Mysql::Command it should behave like a Command set_types with an invalid reader should raise an error with too many types
rspec /Users/stephankaag/dev/do/data_objects/lib/data_objects/spec/shared/command_spec.rb:164 # DataObjects::Mysql::Command it should behave like a Command set_types with a valid reader should not raise an error with correct number of types
rspec /Users/stephankaag/dev/do/data_objects/lib/data_objects/spec/shared/command_spec.rb:172 # DataObjects::Mysql::Command it should behave like a Command set_types with a valid reader should also support old style array argument types
rspec /Users/stephankaag/dev/do/data_objects/lib/data_objects/spec/shared/command_spec.rb:180 # DataObjects::Mysql::Command it should behave like a Command set_types with a valid reader should allow subtype types
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment