Database tweaks module

Created by janroe

drupal database tweaks module
http://drupal.org/project/drupal_tweaks 6.x-1.x-dev on 6.14
Server: Shard hosting with Cpanel, set to php 5.2.1.

The database tweaks module is a component of the drupal tweaks module. The entire drupal tweaks need to be uploaded, but the database tweaks component can be enabled independently.

Main function:
The database tweaks module provides the ability to change mysql settings and some other database related items, if you have the needed permissions on the server. It is part of the wider drupal tweaks module.

Example function:
I installed it in order to try to change the MySql MAX_ALLOWED_PACKET value from 1 MB to something higher. This, since the spam module causes creation/editing of some nodes to exceed its default value. For this, only the "Database tweaks" component is needed.

Nevertheless, for longer posts, spam module caused further MAX_ALLOWED_PACKET errors, that even increases up to 1024 MB did not fix - that seems a bit overdone. Finally, the only way to be able to post was by removing the spam module.

Manage:
Site building > Modules > Drupal tweaks (it creates a top level Heading: modules: database tweaks, drupal tweaks, form2block
User management > Permissions: administer database, administer drupal_tweaks, show all error messages, show all status messages, show all warning messages
Site configuration > Database tweaks (not found with Amin menu module)

Note: The drupal tweaks module creates a top level module heading and top level menu item. If only the database tweaks module is enabled, it appears under site configuration. It does not appear in my admin menu Site configuration when using the Admin menu module. Workaround: go to administration by modules, manually: sitename/admin, By module tab.

Some of the tweak functions are SQL_BIG_SELECTS, MAX_JOIN_SIZE, MAX_ALLOWED_PACKET, default wait_timeout, and a number SQL mode changes. Not that I know - aside from what's in the words - what any of these terms mean.

Experience:
First thing after enabling (one case) or just uploading (other case):

Duplicate entry 'admin/help/system' for key 1 query: INSERT INTO jtr_menu_router (path, load_functions, to_arg_functions, access_callback, access_arguments, page_callback, page_arguments, fit, number_parts, tab_parent, tab_root, title, title_callback, title_arguments, type, block_callback, description, position, weight, file) VALUES ('admin/help/system', '', '', 'user_access', 'a:1:{i:0;s:27:\"access administration pages\";}', 'help_page', 'a:1:{i:0;i:2;}', 7, 3, '', 'admin/help/system', 'system', 't', '', 4, '', '', '', 0, 'modules/help/help.admin.inc') in /home/[username]/public_html/includes/menu.inc on line 2423...

Not knowing how to handle this, "duplicate entry" does not seem that serious, I just continued and the error went away.

The first thing I forgot after this is was to enable database tweaks, again. This is by checking the checkbox at the top of the teaks admin page: Enable database tweaks - "Select if you want to enable above changes."

That seems to refer to the status messages/error message that appears after you have tried to change somthing but the status/error message told you that the change could not be made (/or was made?). This enablement turns itself off after a change has been made.

In order to effectively change, for example, the said packet value go to the section:

Default MAX_ALLOWED_PACKET value:
1MB

Changing it to 2 MB, result is a red warning (when not enabled at the top):

Actual MAX_ALLOWED_PACKET is differ than it was set, probably you do not have proper privileges.

The MAX_ALLOWED_PACKET limit must be a number and greater than 2M (current size is: 1048576).

Nothing else would work either. It did work after enabling at the top of the page. I only figured this out a day later. Changed it to 8 MB, and I could verify that by going to one of the two supplied links at the top, going to: MySQL Info page.

With later install, or with the full package installed, or I simply missed it earlier, I now also see the additional reminder at the very top of the page:

Please enable database tweaks to activate following settings.
Please enable database tweaks to activate following settings.

Well.

Great module.

Then I also checked the other link: Status Report page. There I see something alarming under Query performance: all these values are said to supposed to be 0. But they are definetely not. No idea what it means in practice, but there must be something wrong with my database?