Closed (duplicate)
Project:
Drupal core
Version:
5.x-dev
Component:
other
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 Nov 2006 at 09:06 UTC
Updated:
25 Nov 2006 at 16:50 UTC
after installation the following error occurs
user warning: Table 'drupal.blocks' doesn't exist query: SELECT DISTINCT b.* FROM blocks b LEFT JOIN blocks_roles r ON b.module = r.module AND b.delta = r.delta WHERE b.theme = 'garland' AND b.status = 1 AND (r.rid IN (1) OR r.rid IS NULL) ORDER BY b.region, b.weight, b.module in E:\Discount Club\ApacheDocuments\drupal-5.0-beta1\includes\database.mysql.inc on line 167.
Comments
Comment #1
vkde commentedThis situation happens because the SQL script cannot properly create all tables in MySQL. My installation is based on MySQL 5.0.27-community-nt running on Windows 2003 Server. I created the drupal database manually, used the provided script 'database/database.4.1.mysql', renamed it to .sql and imported it with the 'Restore' tools in the MySQL Administrator (Part of MySQL GUI Tools for Windows, ver. 5.0-r5). The error messages are:
Warning: Error while executing this query:
The server has returned this error message:
BLOB/TEXT column 'pages' can't have a default value
-----------------
Warning: Error while executing this query:
The server has returned this error message:
BLOB/TEXT column 'recipients' can't have a default value
-----------------
Warning: Error while executing this query:
The server has returned this error message:
BLOB/TEXT column 'body' can't have a default value
-----------------
Warning: Error while executing this query:
INSERT INTO blocks (module, delta, theme, status, pages) VALUES ('user', '0', 'bluemarine', '1', '');The server has returned this error message:
Table 'drupal.blocks' doesn't exist
-----------------
Warning: Error while executing this query:
INSERT INTO blocks (module, delta, theme, status, pages) VALUES ('user', '1', 'bluemarine', '1', '');The server has returned this error message:
Table 'drupal.blocks' doesn't exist
-----------------
The same errors are reported if you try to create the tables as SQL commands, using MySQL Query Browser.
If you execute the CREATE commands without the --default ''-- in the corresponding fields, the tables are created, and then you can execute the omitted INSERTs. Drupal does not give error messages anymore and seems to work fine, at least on the surface, developers should say whether taking the defaults off would break any application logic.
This post is to explain the cause of the problem on MySQL 5.0 / Windows, intended more of a hint for the developers, rather than an end-user solution.
-----------------
http://vkde.rothramus.net/
Comment #2
vkde commentedP.S. My version of Drupal is 4.7.4
-----------------
http://vkde.rothramus.net/
Comment #3
heine commentedFor reference http://dev.mysql.com/doc/refman/5.0/en/data-type-defaults.html.
MySQL 5 is a bit more 'strict' when running in strict mode than previous versions and no longer ignores the DEFAULT.
Comment #4
heine commentedand unassigning.
Comment #5
heine commentedDuplicate of http://drupal.org/node/54702
Comment #6
heine commented