See the Mailing lists or Drupal Issue queue. There are also various working groups on groups.drupal.org

:-(( Drupal still requires LOCK TABLE permission

On testing Drupal 4.7 I was saddened to see that 4.7 still requires LOCK TABLE permission - only this time it's harder to fix.

Previously, the sole fix was in db_next_id in database.mysql.inc - of course such fixes are hotly contested and largey unsupported.

Now, two new functions have been added, db_lock_table and db_unlock_table. These are called to lock the variables and the cache tables in bootstrap.inc.

So, where previously, an update to db_next_id in database.mysql.inc such as:

function db_next_id($name) {
  $name = db_prefix_tables($name);
  $id = db_result(db_query("SELECT id FROM {sequences} WHERE name = '%s' FOR UPDATE", $name)) + 1;
  db_query("REPLACE INTO {sequences} VALUES ('%s', %d)", $name, $id);

  return $id;
}

has now to be replicated to bootstrap.inc such as:

function variable_set($name, $value) {
  global $conf;

  db_query("SELECT name FROM {variable} WHERE name = '%s' FOR UPDATE", $name);
  db_query("REPLACE INTO {variable} (name, value) VALUES ('%s', '%s')", $name, serialize($value));
  if (!db_affected_rows()) {
    db_query("INSERT INTO {variable} (name, value) VALUES ('%s', '%s') FOR UPDATE", $name, serialize($value));
  }

  cache_clear_all('variables');

  $conf[$name] = $value;
}

and


function cache_set($cid, $data, $expire = CACHE_PERMANENT, $headers = NULL) {
db_query("SELECT cid FROM {cache} WHERE cid = '%s' FOR UPDATE", $cid);

Generic Lineage [Nested Trees] Proposal

Thanks to a comment from Dries on the developer list, I'm bringing this here. It needs to be discussed before I go ahead and do it, because there is at least one potential snag.

The Issue
Sorting any list of objects in a hierarchy requires a recursive algorithm unless additional information is stored in the database.
My proposed solution
The Nested Trees solution is what I used for the Taxonomy Lineage module. In this solution, an API would be formed which affected nodes can use to update their lineage trees. The table Lineage Trees currently has an id field, a depth field and the lineage signature, which is effectively a concatenated string of the hierarchy above the affected object; the strings are encoded so that they sort in the correct order. For this solution, I would simply add a type field, which would be set to 'taxonomy' or 'book' or 'comment' or whatever other system wanted to use the lineage functions.
Interface
Only two functions need to be exposed as an API. lineage_update_object and lineage_delete_object. However, the problem arises in that the API needs some information about the object it's going to update, and this information is quite different in book than taxonomy than comment.

Specifically, the API needs to know 3 things. How to construct the object's lineage signature. How to find the object's parent. How to find the object's children. I'd thought about passing along this information as a query that is passed to the API, but that becomes problematic with constructing the lineage signature. I believe a callback is probably the best solution, but I'm not completely convinced yet.

Potential optimization in taxonomies

Currently, hierarchy in vocabularies is handled by the table term_hierarchy, which holds exactly 1 row for each term (give or take referential integrity being accidentally broken as the DBMS does not enforce it).

This means that there is effectively a bijection between entries in term_hierarchy and term_data, so the term_hierarchy/parent attribute is actually an implementation of a parent attribute on the term entity implemented in term_data.

I think either of two optimizations should be considered:

What doest it mean?

Hi
When I try to post my blog entry I got this error :
Fatal error: Cannot redeclare conf_init() (previously declared in /www/lavacube.net/balasatya/public/includes/bootstrap.inc:45) in /www/lavacube.net/balasatya/public/includes/bootstrap.inc on line 44
What does it mean?
Thank you.

I've Been Hacked: BI0S TEAM

Anyone else have this message on their homepage when they woke up this morning?

"BI0S TEAM"

- nautis.com

Cannot access site due to taxonomy problem

Hello,

I am in big trouble. My community site just set up a few weeks ago is not accessible. I am running this site on a server with Apache, MySQL, PHP. The error seemed to appear from one minute to the other, when I tried to login. Afterwards the following error ocurred:

Fatal error: Call to undefined function: taxonomy_get_vocabularies() in
/home/www/web9/html/drupal/modules/taxonomy_menu/taxonomy_menu.module on
line 25

I tried to deleted taxonomy_menu.module though not the database entry. Afterwards this error showed up:

Pages

Subscribe with RSS Subscribe to RSS - Deprecated - Drupal core