Hey all,

Has anyone had problems running Drupal version 4.63 DB scripts with MySQL 5.0.15 ?

I know it's a really newbie problem - I'm trying to install the Drupal 4.63 schema using MySQL 5.0.15 and their Quesry Browser. It's complaining about some of the insert statements (specifically the blocks table) since they don't contain values for non null fields (pages and types).

I've been unable to get the first account to have admin privileges so I'm starting over and noticed these problems.

Thanks,
Russ...

Comments

nightlith’s picture

Same here. I've spent all day yesterday testing CMS systems (Mambo, Joomla, Drupal) and all of them are broken with 5.0.15 with similar issues. NOT NULL values aren't being passed any default values. Whether it's because previous SQLs encouraged this lazy behaviour or it's a problem with SQL I don't know. But as it stands now I'm going to have to uninstall 5.0.15 to get any of these CMS's to work.

Specifically, here's an error I get when trying to post content (any content; page, story, blog, etc)

Field 'revisions' doesn't have a default value query: INSERT INTO node (status, moderate, promote, sticky, comment, title, body, format, uid, created, type, teaser, changed, nid) VALUES('1', '0', '1', '0', '2', 'Test', 'Uber test', '1', '1', '1130960210', 'blog', 'Uber test', '1130960234', '1') in D:\WebRoot\testbed\drupal\includes\database.mysql.inc on line 66.

In the node table a field "revisions" is between "body" and "sticky" but as you can see from this call, no value is being passed and the field is indeed set for "Not Null". What gives?

Oh, and to the original poster, Any field that's been giving me errors like this I've just been changing from Not Null to Null. If you notice in the mysql database inc there are some other insert commands after the Replace commands. I had to manually execute those after the Replace commands stopped the file from being processed. That's how I got it to install.

sepeck’s picture

to php5.0.4.

Evidently there was a change between php 5.0.4 and 5.0.5. There are some open issues that have been reported already.

-sp
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide

nightlith’s picture

appreciate the quick reply, but in my case this didn't help.

5.0.4
mysql
Client API version 4.1.7

FWIW 5.0.4 and .5 have the same mysql api version. (Assuming this is where the problem lies)

As I've said though, changing Revisions to a Null as opposed to Not Null fixes it and doesn't at first glance have any detrimental effects (revisions still work, etc). I'm assuming the same goes any other 'not null' fields.

bronco’s picture

After fixing the revisions column I got:

user error: Out of range value adjusted for column 'format' at row 1
query: INSERT INTO node (status, moderate, promote, sticky, comment, title, body, format, uid, created, type, teaser, changed, nid) VALUES('1', '0', '0', '0', '0', 'hello world', '
Bronco

', '', '2', '1130964718', 'page', '
Bronco

', '1130965567', '7') in D:\bin\website\drupal\includes\database.mysql.inc on line 66.

has anybody got a clue?

tia

bronco’s picture

what I was tying to say is that the statement is trying to insert '' into the format column...

sepeck’s picture

I read somewhere that with php 5.x you have to use MySQLi in php for MySQL version 4.1.5 or later. The mysql stuff would no longer work and you had no choice. I know that when I ran through test installs on an IIS system I had to use the MySQLi dll's and not the other.

This article I found in the comments of the mysqli php manual is some interesting reading on the subject.

I am beginning to wonder if some of the problems people are having with Drupal and php5 have more to do with using MySQL instead of MySQLi.

Certainly for thos people using Windows/IIS and Drupal. Peter Guy's awesome php guide for IIS mentions this as well.

-sp
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide

Thox’s picture

I use Windows, Apache, PHP 5.0.5, MySQL 5.0.15, using the normal mysql extension... no troubles here except some minor SQL issues with the new version of MySQL, which I'm working on fixing.

Thox’s picture

Please report any particular MySQL 5.0.15 problems on the new issue I have created: #36133.

I know the installation fails, and also that certain INSERTs fail. I'll get working on a patch tomorrow morning.

drewish’s picture

see #76743: Incompatibilities with MySQL 5.0