similar to: MySQL transactions not working in unit tests?

Displaying 20 results from an estimated 3000 matches similar to: "MySQL transactions not working in unit tests?"

2006 Mar 24
10
innodb vs myisam
Hi, I have been using myisam tables in mysql with rails because my client will soon want fulltext searchable content, however when I migrated my development db from schema.rb all of the tables generated were innodb. I understand that I can override this, but also like the transactions and foreign keys of innodb. So 2 questions really: 1. are transactions in activerecord dependent on innodb or do
2006 Mar 07
3
STI and unit testing
Hi all, I''m having a bit of a problem with unit testing. I''ve simplified my models to try and get my head round it but I''m still struggling. I''m using STI and trying to write tests for the extended models (code below). I''ve written test cases for the extended models which themselves extend the test case for the parent model, so BarTest extends
2006 May 05
7
Testing model: test becomes dependent on previous test
Im having trouble with Testing models. im following the tutorials in the book Agile Web Development with Rails. if i execute the code product_test.rb, i get this error: ============================================================ 1) Failure: test_update2(ProductTest) [test/unit/product_test.rb:30]: <29.95> expected but was <99.95>. 3 tests, 11 assertions, 1 failures, 0 errors
2006 Jan 30
11
Database Selection
Hi, I am a RoR newbie and I''ve been experimenting with different databases (mySQL, PostgreSQL, etc.) and different table types (MyISAM vs. InnoDB). Is there a preferred database/table type for RoR development. I like how MySQL''s InnoDB tables enforce referential integrity, but these tables require a lot more storage space then MyISAM tables. For everyone with a lot of RoR
2005 May 24
8
mysql & xen - is anyone using this combination successfully?
Hi, I''ve tried running the mysql daemon on a few different servers running Xen, and seen two different sorts of problems. In one case, on two identically configured systems, the mysql daemon segv''s but restarts immediately. This happened with Xen 2.0.5, I haven''t yet seen it with 2.0.6. It seems to be the same problem as this one:
2013 Sep 13
2
MySQL 5.1.69 at CentOS 6.4 doesn't know enable-named-pipe?
Hello, I've only had experience with PostgreSQL sofar, but have now to install MySQL (and WordPress) on a CentOS 6.4 /64 bit server. I have installed the mysql-5.1.69-1.el6_4.x86_64 package and executed the following commands: # chkconfig mysqld on # service mysqld start # /usr/bin/mysqladmin -u root password 'xxxxx' # /usr/bin/mysql_secure_installation Then I've noticed that
2009 Sep 30
2
MySQL fails with tablespace on OCFS2
I have set up an cluster with ocfs2 on top of drbd in primary/primary mode. As long as the datadir is in /var/lib/mysql, everything works fine. But as soon as I put the datadir on the ocfs2 filesystem /mnt/data/mysql mysql fails with: [Ubuntu] root at fs2:/etc# mysqld --safe-mode 090930 18:08:14 [Warning] Can't create test file /mnt/data/mysql/fs2.lower-test 090930 18:08:14 [Warning]
2008 May 09
1
Test Unit can't change data
I have converted my engine from myISAM to InnoDB, the matter now in Test Unit, the table cant do any changes for CRUD. Any advice? But if I convert it back, the CRUD can run very smooth and data value in attributes changed. Reinhart http://teapoci.blogspot.com -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you
2006 Feb 27
6
MySql 4.0.16 and Migrations
It appears that you cannot use migrations (out of the box) with mysql 4.0.16, because when creating a table, the statement says "ENGINE=InnoDb", instead of "TYPE=InnoDB". Looking at the source code for the adapter, this appears to be hard coded. Is there any supported way to make this work with older versions of MySQL? David
2011 Feb 04
1
GlusterFS and MySQL Innodb Locking Issue
I'm having some problems getting two nodes to mount a shared gluster volume where I have the MySQL data files stored. The databases are Innodb. Creating the volume on the master server works fine and it mounts, and when I mount that on the first mysql node it works fine, too. However, when I try to mount it with the second node I get this error: InnoDB: Unable to lock ./ibdata1, error: 11
2009 Jan 20
3
Re : problem with running mysql on glusterfs
Hello. I would like to ask about having mysql data hosted on glusterfs. Please see my issue below. I have posted DEBUG log information on pastebin. I am using GlusterFS version: glusterfs 1.4.0rc7 FUSE Version :fuse-2.7.3glfs10 my ISSUE is: When hosting mysql data on glusterfs I have an issue: The first time I start the glusterfsd server using [root at mohan ~]#
2006 Aug 02
2
many-to-one relationship, do I need a second table?
Ok, to keep things short. Im wondering if I need a secondary relationship table to handle my many-to-one relationships. Here is an example of what I''ve written down. For instance say I want to find all of the people in a given location. class Location < AR:Base has_many :people end class Person < AR:Base belongs_to :location end My SQL tables look like: CREATE TABLE
2006 Jan 11
3
How do you do a custom sql call in rails?
Hi. I am developing an industry specific crm that allows busineses to track customers in a particular way. Each customer will be assigned a customer number. The first customer will have a customer number of 1, the second customer_number = 2, etc... Note that this customer number is not global but particular to the account that created the customer (see schema snip below). I need to have a
2015 Mar 30
5
mysql can't connect from localhost -strange behavior
Hey all, I've been having some trouble creating a mysql user that can connect to the database from localhost. It's always been a straight forward thing to do in the past, so its time for a sanity check, if you guys don't mind. Ok, so here's the actual command with actual simplified password that I'm using. It's on localhost so I don't think it's a security threat
2006 Mar 20
3
Unit tests leave data behind when they should not
Hi, I was confused yesterday. I have bunch of tests and one of those was testing ActiveRecord::save and it was all right, but next method failed because table still had newly created record. All documentation suggests that it should not be the case and that data is reloaded from fixtures before every method is run. I am running edge rails and really did not have anything special done about
2006 Mar 14
3
specifying table type
I''ve been creating my tables using the command line approach Dave advocates in AWD. I just noticed that they''re being created as MyISAM-type tables. I remember reading (but not where) that I should be creating these as InnoDB-type tables. So, two questions... 1) Is the table type important? (a "why" component to the answer would be nice too ;-) ) 2) If so, is
2006 Jan 26
9
Problem with schema_db_import on Site5?
Hello, I am trying to put my rails app on a host .So I presume the method to do this is to first do rake db_schema_dump and then copy it to the host and do rake db_schema_import. I use mySQL Ver 14.7 Distrib 4.1.14, for pc-linux-gnu (i686) using readline 4.3 ** Invoke db_schema_import (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db_schema_import rake
2007 Jan 30
2
How to use migrations to convert engine type to InnoDB?
I''ve been looking through some references but can''t seem to find the right syntax and commands. I basically just want to have a migration to convert my db and all my tables to InnoDB. Does anyone know a tutorial or the migration syntax to do this? Thanks in advance :-) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are
2006 Feb 01
3
Test data life cycle confusion
Hi, It states on page 140 of Agile Web Development with Rails: Here?s the bottom line: even if a test method updates the test database, the database is put back to its default state before the next test method is run. This is important because we don?t want tests to become dependent on the results of previous tests. Well, I''ve been running into a brick wall with some functional tests
2005 Dec 15
4
Order of tests matters???
I have a problem with tests. I always thought that the order of tests doesn''t matter because the fixtures are reloaded before every test method. However, I''ve just discovered that this isn''t true. This is a quote from the "Guide to testing the rails" howto: "... if we had another test method, we wouldn’t have 10 users on the 2nd test because they would