You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My system is an Ubuntu 18.04-based distro. The db is MySQL 8.0.13 (defaults: utf8m4/utf8mb4_0900_ai_ci; note that Rails sets, by default, the charset to utf8).
I've reproduced it on two separate machines (but configured in a very similar way).
Test case, to be run with bash:
MYSQL_USER=
export MYSQL_PWD=
export MYSQL_SOCKET= # fill only if required
ruby -v # 2.4.6
gem install rails --version '~> 4.2.0'
rails new testjor
cd!$
bin/spring binstub --remove --all # rails new --skip-spring has no effectecho"gem 'mysql2', '~> 0.4.0'">> Gemfile
bundle install
bundle exec gem list '^(rails|mysql2)$'# 0.4.10/4.2.11.1echo'class MyModel < ActiveRecord::Base; end'> app/models/my_model.rb
mysql -u "$MYSQL_USER" -e 'CREATE SCHEMA testissue; CREATE TABLE testissue.my_models (id INT PRIMARY KEY AUTO_INCREMENT, myint INT, mystr VARCHAR(255))'
perl -i -pe 's/db\/development.sqlite3/testissue/' config/database.yml
perl -i -pe 's/(adapter:) sqlite3/$1 mysql2/'!$
[[ "$MYSQL_SOCKET"!="" ]] && perl -i -lpe '/adapter/ && print " socket: $ENV{MYSQL_SOCKET}"'!$
bundle exec rails r "MyModel.count"# kaboom!
Hello!
I'm getting a segfault under certain circumstances. I'm not sure what is the exact cause, but it may be related to
mysql2
.Test setups and issue reproducibility:
My system is an Ubuntu 18.04-based distro. The db is MySQL 8.0.13 (defaults:
utf8m4
/utf8mb4_0900_ai_ci
; note that Rails sets, by default, the charset toutf8
).I've reproduced it on two separate machines (but configured in a very similar way).
Test case, to be run with bash:
Segfault output:
The text was updated successfully, but these errors were encountered: