No fresh download quite yet, but I just made a large commit to the MediaWiki source of the last week’s work. This is going in the trunk — aka MediaWiki 1.16alpha. There are a few bugs I hope to catch this weekend, at which point I’ll put up a fresh archive of working code.
config/index.php:
* Made installation on IBM DB2 more robust
* Replaced E_ALL error reporting mode with E_ALL | E_STRICT
includes/db/DatabaseIbm_db2.php
* Enabled DB2_CASE_LOWER option for all connections and statements
* Enabled DB2_DEFERRED_PREPARE_ON for all statements — delays statement preparation until execution to reduce database load
* Enabled DB2_ROWCOUNT_PREFETCH_ON for all statements — makes db2_num_rows() work correctly
* Cleaned up error handling
* Cleaned up method signatures
* Rewrote insertion to use prepared statements — required for inserting more than 32k of text
* Insertion will never try to insert a NULL value into a primary key
* Now relying on implicit casting in DB2 9.7 — no longer sniffing to see if column is integer or string before adding quotes
* Implemented actual prepared statement handling — required for correct INSERT, UPDATE behaviour
* In install mode, the class will print additional messages to the install bullet scroll
* Added bitwise operation abstraction (BITNOT, BITAND, BITOR)
includes/specials/SpecialAncientpages.php
* Added skeleton DB2 syntax to the database-specific switch statement
maintenance/convertLinks.inc
* Made limit clause database-agnostic
maintenance/ibm_db2/tables.sql
* Revised types to better match the main schema
* All tables names now the same as MySQL — was using Postgres schema’s names before
* Added some additional indices
* Added the change_tag, tag_summary, valid_tag, user_properties, log_search, and l10n_cache tables
* Added several new columns
maintenance/storage/compressOld.inc
* Made limit clause database-agnostic
SQL6031N Error IN the db2nodes.cfg file at line number "1". Reason code "10".
DB2 caches your machine’s hostname in several places. If your machine is changing its hostname, or if you are somehow moving an existing installation to a machine with a different hostname, you will need to adjust the hostname stored by DB2. Hostname change is common in virtual and cloud environments, so even better than adjusting it would be writing a script that adjusts it for you.
Here’s my rudimentary stab at a such a script:
#!/bin/sh echo -n "Discovering the new hostname " UNAME_CACHE=$(uname -n)
echo -n "Adjusting hostname list for unconfigured database partitioning feature " # this may need to be changed if DPF preconfigured if[ -e /home/db2inst1/sqllib/db2nodes.cfg ]; then
chmod 666 /home/db2inst1/sqllib/db2nodes.cfg
su - db2inst1 -c "cp /home/db2inst1/sqllib/db2nodes.cfg /home/db2inst1/sqllib/db2nodes.cfg.old"
su - db2inst1 -c "echo 0 $UNAME_CACHE 0 > /home/db2inst1/sqllib/db2nodes.cfg" fi
echo -n "Updating DAS configuration " # todo # db2 uncatalog node <old_hostname>
db2 catalog admin tcpip node $UNAME_CACHE remote $UNAME_CACHE system $UNAME_CACHE
db2 update admin cfg using DB2SYSTEM $UNAME_CACHE
db2 update admin cfg using SMTP_SERVER $UNAME_CACHE
This doesn’t cover all cases. For example, if you use extended operating system security, you may also need to set the db2accountname and db2instowner parameters. A quick check with db2set -all should tell you if this applies in your case — if there is something that looks like a hostname in those parameters already, you need to change them.
I may also have missed other necessary changes. Please let me know if I did.:-)
The DB2 data movement tool sounds like an excellent way to move stuff from, say, MySQL to DB2. I should see if I can use it to move a MediaWiki database.
Speaking of MediaWiki, I swear I’ll have a patched zip of 1.15 ready any day now.:-)
Find the hour to watch this video. They get everything really, really right. Plus, it looks to integrate well with everything. I look forward to using Google Wave for all my personal communication, as well as using a private install of Google Wave at IBM for all my business communication.
The two javascript functions above are very useful. The first one executes something after a set delay, and the second executes something at regular intervals. The syntax is very similar.
var time = 2000; // 2 seconds
window.setTimeout(function(){alert(‘Yay!’); }, time);
window.setInterval(function(){alert(‘Woo!’); }, time);
Unfortunately, they weren’t working for me earlier. It turns out I wasn’t fully-qualifying them. Specifically, I was calling setTimeout() rather than window.setTimeout(). The latter works.
Most examples use the abbreviated form, which consistently doesn’t work for me.
Looks like the original cofounder of MySQL Inc, Monty Widenius, is forking MySQL. He’s going to try to merge with all the other forks, but I suspect that Oracle will not be interested in merging something they just bought with this particular fork. Especially since it will not support InnoDB, an alternate MySQL engine bought by Oracle some time before they bought regular MySQL.
Directories used to be important in the mid-1990s, as they tended to provide better search results than dumb link crawlers like Altavista. Yahoo started off as a human-edited hierarchical directory of links and adopted the crawler approach later.
However, since Google has come along with a better search algorithm, directories are in decline. dmoz is the only major one left, and this hasn’t escaped the notice of SEO folk, who chase the prestigious linkback and fill the submission queue with a lot of crud.
One thing I just did at work was use SurveyMonkey to put together a quick survey about the DB2 Express-C download experience.
I do wish they offered a prefilled dropdown with a list of countries, though.
Another SurveyMonkey limitation I just encountered is the need to pony up some dough in order to have more than three trackable links to a survey.
Still, the site seems to be fairly rugged. I am happy with its reporting capabilities from past experience.
This is a personal journal, and so doesn't represent the opinions of IBM. Why IBM? Because I work on the freeDB2 Express-C database at IBM. I think it's pretty good.