drizzle
Profile
Search
 
Powered by SoftLayer
EasyBugContribution

This short tutorial on how to help out with bug handling for Drizzle comes from Jay Pipes.

Helping with bug management and fixing is a great way to get involved if you're not involved already, and a good way to introduce yourself to the code base.

Here is a way you can help with bugs and have fun at the same time.

1) Confirm bugs in NEW, INCOMPLETE, or OPEN statuses.

So, one of the most valuable things you can help with is confirming bugs that are in the above statuses, and helping identify the source of the issues. Bugs that are in NEW status all need to be verified by another user/developer and set to a "confirmed" status.

To verify/confirm a bug, the easiest way is to do the following from your shell. I assume that $REPO is the directory you store your Drizzle branches.

a) Grab the freshest, most delicious pull of Drizzle:

$> cd $REPO
$> bzr branch lp:drizzle local-bugs

This will create a new branch called "local-bugs" from the remote Drizzle trunk on your local `puter.

b) Build Drizzle and run the test suite:

$> cd local-bugs
$> ./config/autorun.sh && ./configure --with-debug && make -j2
$> make test

(you can change make -j2 to whatever concurrency level you'd like; I typically set to the number of cores on the machine)

c) The test suite should always run successfully. If it doesn't report a bug about the failures! :)

d) Go to Drizzle's NEW bug listing page.

e) Choose a bug that looks interesting. For an example, I'll choose Bug #309248 "create table if not exists select from does columns from right to left".

f) Now you'll have to verify the bug. If the bug reporter included a way to reproduce the bug, this is usually fairly simple. The way I do it is like so:

$> cd tests
$> ./dtr --start-and-exit
$> ../client/drizzle --user=root --port=9306

This will fire up a server for your local "local-bugs" branch and a client connected to it. Once you are in the client, just type "use test<Enter>" and then the SQL commands needed to reproduce the test case. In the bug example, Monty Taylor, the bug reporter, has nicely included SQL statements to reproduce the bug. To verify the bug, I simply execute the same statements in my client and see if I get the same bad results:

drizzle> use test
Database changed
drizzle> create table t1 (a int not null, b int, primary key (a));
Query OK, 0 rows affected (0.01 sec)

drizzle> show create table t1;
+-------+----------------------------------------------------------------------------------------+
| Table | Create Table                         |
+-------+----------------------------------------------------------------------------------------+
| t1    | CREATE TABLE `t1` (
 `a` int NOT NULL,
 `b` int,
 PRIMARY KEY (`a`)
) ENGINE=InnoDB |
+-------+----------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

drizzle> insert into t1 values (1,1);
Query OK, 1 row affected (0.01 sec)

drizzle> create table if not exists t1 select 2;
ERROR 1364 (HY000): Field 'a' doesn't have a default value
drizzle> drop table t1;
Query OK, 0 rows affected (0.00 sec)

drizzle> create table t1 select 1,2,3;
Query OK, 1 row affected (0.01 sec)
Records: 1  Duplicates: 0  Warnings: 0

drizzle> create table if not exists t1 select 1,2;
Query OK, 0 rows affected (0.00 sec)

drizzle> select * from t1;
+---+---+---+
| 1 | 2 | 3 |
+---+---+---+
| 1 | 2 | 3 |
+---+---+---+
1 row in set (0.00 sec)

In this case, I was able to verify the first part of the bug (described in the bug title), but not the second example in the bug. So, I make a comment on the bug report saying exactly that, including my output from the Drizzle client. I set the status of the bug to "Confirmed" and ask Monty in the comment to verify the second example he posted no longer occurs.

If you *cannot* verify the bug behaviour, then set the status to "Incomplete". This will put the bug into a 90-day holding pattern waiting for the original reporter to get back to us about the bug.

Feel free to change the Priority of a bug if you have a strong conviction about it. :)

By following the above steps, and helping to verify bugs, you can make a signficant contribution to Drizzle.

Site generously hosted by SoftLayer Technologies