Showing posts with label Summer of Code. Show all posts
Showing posts with label Summer of Code. Show all posts

Monday, March 23, 2009

Easy server testing with MySQL Sandbox


MySQL Sandbox

MySQL Sandbox 2.0.18 introduces a new feature, changing port. You can now change the listening port for a sandboxed server, either as a standalone operation, or while moving it, using the sbtool.
There is a feature in the Sandbox, introduced in 2.0.13, that makes really easy to test servers in special conditions. If you need to start or restart a server using an option that you know you will need only for the next test, you can add the option to the command line invocation of the start or restart scripts.
SoC

$ ./start --key-buffer=2G
$ ./use -e "show variables like 'key_buffer_size'"
+-----------------+------------+
| Variable_name | Value |
+-----------------+------------+
| key_buffer_size | 2147483648 |
+-----------------+------------+
./use -e "show variables like 'innodb_buffer_pool_size'"
+-------------------------+---------+
| Variable_name | Value |
+-------------------------+---------+
| innodb_buffer_pool_size | 8388608 |
+-------------------------+---------+

$ ./restart --innodb-buffer-pool_size=2G
./use -e "show variables like 'innodb_buffer_pool_size'"
+-------------------------+------------+
| Variable_name | Value |
+-------------------------+------------+
| innodb_buffer_pool_size | 2147483648 |
+-------------------------+------------+

Some more news. There is a mailing list to discuss the Sandbox development, and new members are welcome. The Sandbox is also awaiting volunteer students for Google Summer of Code.

Monday, March 16, 2009

MySQL Sandbox and Summer of Code 2009


Summer of Code 2009

As you may have seen, MySQL Sandbox is improving, but there are still many features to be implemented.
If you know Perl - or you want to convert the Sandbox into another portable language - and you want to help with the new development, you may consider getting into Google Summer of Code under MySQL mentorship. To apply, you must be a student, and accept the program terms.

Monday, March 31, 2008

Summer of Code adjustment

The Google Summer of Code deadline has been shifted one week forward. This means that students have until April 7 to submit their applications.

Submission status


We have so far received 38 proposals.
Some of them are excellent. Many are good. A few of them could be improved. If you have submitted a proposal without reading my recommendations you have now plenty of time to review your submission and adjust it for maximum quality.

Advice to students: how to get your application approved


Submitting an application is only the first step. If your proposal is weak, your chances of being chosen are limited. Now it's time to check the application and improve its contents, according to the guidelines mentioned above.
Now, pay attention. If you get a message from a mentor asking for additional material, it's a sign that your application is weak, and it may be discarded. Take those messages seriously, and try your best to comply.

Competition is fierce!


Even if you submitted a very good application, there is always a chance that someone else has submitted a better one for the same project, thus competing for the attention of the only mentor available for that task. Don't settle for "very good": sprint for excellence!

Size matters


A good application is neither too short or too long. If you write only an abstract, your proposal will get little attention. And if you write too much, you may wear out the mentors patience.
Your proposal must demonstrate that you have an independent understanding of the problem, and at least a general idea of how to solve it. Being too specific before discussing the project with a mentor is not going to gain many points. If the mentors asks for such details that's OK. If you are unsure, ask a friend to read your application and tell you if it makes sense. Ask your friend to describe the project to you. If you don't recognize the project from your friend's description, you may have a problem.
Good luck!

Saturday, March 29, 2008

Last chances to apply for Google Summer of Code 2008


Google Summer of Code is still open until March 31st.
There are many interesting projects available in the ideas page.
Please read the guidelines and apply before it's too late!
Plenty of opportunity of contributing to your favorite database and working with great developers. Check the ideas page for a list of famous names willing to spend time with enthusiastic students.

Tuesday, March 25, 2008

How to write a good application for Summer of Code

Do you want to apply for a MySQL project under Google Summer of Code?
Please read these instructions carefully, then.
State the project you want to tackle in the application title.
Using a title like John Doe's info or application for MySQL are unlikely to attract the mentors attention or to make a good first impression.
State your view of the project
Simply repeating what is in the ideas page won't get you any marks. Say what you would like to do in your own words.
Explain why we should choose you
And be persuasive! The best way to persuade us is by showing a clear analysis of the project. A list of famous names that have praised your work will not impress us.
Don't over-represent yourself
If you claim technical expertise that you don't possess just to get the application, you will do wrong to all the parties involved. We will eventually find out. If we find out soon, you simply won't get accepted. If we find out later, we will have to fail you.
Be bold!
Dare suggest something unusual and beautiful. We are listening. Provided that you are able to deliver what you dream, we'll be happy!
Be brief!
Our mentors are volunteering their time for these projects. If you submit a 10 pages application, chances are that it won't be appreciated. Make it simple, but not too simple (Einstein)

Monday, March 24, 2008

Summer of Code projects for MySQL Proxy

Google Summer of Code opens for proposals from March 24th to 31st.
There are several projects available in the ideas page. I am available to mentor some projects about MySQL Proxy enhancements. If you like any of them or have any other Proxy related project to suggest, feel free to discuss a proposal in the SoC mailing list.
Some caveats for students willing to try their hand at any Summer Of Code project:
  • Please state your programming skills clearly. Don't inflate your previous experience.
  • Remember that this is a full time job. You won't have time to spend on long vacations, and you won't be able to work at these projects together with another job;
  • A Summer of Code is a full time job. You will be requested to put up 40 hours a week.
  • You will be requested to submit weekly reports;
  • There are dates when you are requested to submit your results. Please consider them carefully before accepting. If you don't make the deadline, you won't get paid.
The above remarks may sound too harsh, but consider that Google is going to pay a non trivial amount of money for your participation, and in exchange for that money you will have to produce what you agree with the mentoring organization.
And keep in mind that your mentors have a full time job of their own. They will be allowed by the mentoring organizations to dedicate a limited amount of time to Summer of Code (even though I know of mentors who have dedicated much of their free time to SoC projects). In this situation, if you work hard, you will be making your time and theirs worth the effort, and everyone wins.
Instead, if you overcommit at the beginning, or don't work hard throughout the summer, it will be a wasted experience for all.

That said, cooperation between companies with experienced developers and students willing to prove themselves has often resulted in excellent work. If you know what awaits you and you are willing to try, you are most welcome!

Wednesday, March 19, 2008

Summer of Code - Get ready with your proposals

The Summer of Code is back.

Students, if you want to apply for a project with MySQL, be aware of the timeline.

March 17-24:Would-be student participants discuss application ideas with mentoring organizations.
March 24 ~12 noon PDT / 19:00 UTC Student application period opens.
March 31
5:00 PM PDT /
00:00 UTC April 1, 2008
Student application deadline.

What you need to do now, before the submission for application opens, is to discuss the ideas already published or suggest new ones using the mailing list.
This year there is an interesting novelty for MySQL. You can apply for one of the worklog that are open for community participation with the Code Contribution Program.
If you have ideas for some projects that are not in the above lists, you can send a proposal to the mailing list, and discuss it with the mentors.
The application opens in 5 days. Get ready!

Monday, September 17, 2007

MySQL Test Creator - wrapping up a Summer of Code experience

Summer of Code image
I talked about this matter already, but now it's time to wrap up.
The Summer of code is over, and the project I have mentored is finished, with a new tool as its outcome, the MySQL test creator.

The student who developed this tool, Charlie Cahoon, did a decent job. All in all, considering that it was his first serious developing experience, he got an excellent result. The maturity stage is still alpha, but he did the breakthrough work to get the development of this tool in the right track.

What do we have in hour hands? A tool that will speed up and make easy the writing of test scripts, during a normal session with the MySQL client. It means that you will fiddle with the database in your usual way, and the test creator will work in the background, writing a test script with its corresponding result file.
Its features include
  • starting, stopping and resetting the background script creation;
  • using loops;
  • removing errors from the script;
  • undoing the last command;
  • showing the test script.
Let's see an example.

mysql> start;
+------------------------+
| TEST CREATOR |
+------------------------+
| Testing has started... |
+------------------------+
1 row in set (0.00 sec)

mysql> create table t1 (id int);
Query OK, 0 rows affected (0.01 sec)

mysql> set @counter = 0;
Query OK, 0 rows affected (0.00 sec)

mysql> start_loop myvar 100;
+-------------------------+
| TEST CREATOR |
+-------------------------+
| Beginning loop creation |
+-------------------------+
1 row in set (0.00 sec)

mysql> set @counter = @counter + 1;
Query OK, 0 rows affected (0.00 sec)

mysql> insert into t1 values (@counter);
Query OK, 1 row affected (0.00 sec)

mysql> stop_loop;
+--------------------------------+
| TEST CREATOR |
+--------------------------------+
| Executed 2 queries X 100 times |
+--------------------------------+
1 row in set (0.02 sec)

mysql> select count(*) from t1;
+----------+
| count(*) |
+----------+
| 100 |
+----------+
1 row in set (0.00 sec)

mysql> stop;
+---------------------+
| TEST CREATOR |
+---------------------+
| Testing has stopped |
+---------------------+
1 row in set (0.00 sec)

mysql> view test;
+-----------------------------------+
| Test File |
+-----------------------------------+
| --disable_warnings |
| DROP TABLE if exists t1; |
| --enable_warnings |
| create table t1 (id int); |
| set @counter = 0; |
| let $myvar = 100; |
| while ($myvar) |
| { |
| set @counter = @counter + 1; |
| insert into t1 values (@counter); |
| dec $myvar; |
| } |
| select count(*) from t1; |
+-----------------------------------+
13 rows in set (0.00 sec)

If you have ever tried to create a loop in mysqltest language, you know what a time saver this tool will be.
Another example. Getting rid of errors:

mysql> start;
+------------------------+
| TEST CREATOR |
+------------------------+
| Testing has started... |
+------------------------+
1 row in set (0.00 sec)

mysql> select 1 as info;
+------+
| info |
+------+
| 1 |
+------+
1 row in set (0.00 sec)

mysql> select 2 as info;
+------+
| info |
+------+
| 2 |
+------+
1 row in set (0.00 sec)

mysql> select this is wrong;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'wrong' at line 1
mysql> view test;
+-----------------------+
| Test File |
+-----------------------+
| connection con55; |
| select 1 as info; |
| select 2 as info; |
| --error 1064 |
| select this is wrong; |
+-----------------------+
5 rows in set (0.00 sec)

mysql> discard_last;
+-------------------------------+
| TEST CREATOR |
+-------------------------------+
| Last query has been discarded |
+-------------------------------+
1 row in set (0.00 sec)

mysql> view test;
+-------------------+
| Test File |
+-------------------+
| connection con55; |
| select 1 as info; |
| select 2 as info; |
+-------------------+
3 rows in set (0.00 sec)

mysql> select 3 as info;
+------+
| info |
+------+
| 3 |
+------+
1 row in set (0.00 sec)

mysql> wrong;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'wrong' at line 1
mysql> discard_last;
+-------------------------------+
| TEST CREATOR |
+-------------------------------+
| Last query has been discarded |
+-------------------------------+
1 row in set (0.00 sec)

mysql> view test;
+-------------------+
| Test File |
+-------------------+
| connection con55; |
| select 1 as info; |
| select 2 as info; |
| select 3 as info; |
+-------------------+
4 rows in set (0.00 sec)

mysql> stop;
+---------------------+
| TEST CREATOR |
+---------------------+
| Testing has stopped |
+---------------------+
1 row in set (0.00 sec)
There are still a few glitches to take care of, but the results so far are really great!

Monday, August 06, 2007

Summer of Code pleasures

Summer of Code image

As a professional tester, I have a dream about a tool that will let me use my favorite SQL manager, and at the same time create tests ready to be plugged to the regression test suite.
I have been dreaming and planning about it, and finally the magic tool is shaping up.
I am mentoring a Summer of Code project, assigned to Charlie Cahoon. After a long preparatory work and much planning, the MySQL test creator is finally out!
Initially, it was planned as a separated tool, a replacement for the MySQL command line. The idea is that you write queries and eye the results, while the tool in background is writing a polished test script. That would have been a good tool, multi platform, easy to use, but limited to the command line.
Then the MySQL Proxy came along, and we decided to use it as a backend. Thus the tool, instead of being written in C++, it ended up in Lua. Kudos to Charlie for learning the language very quickly and for coding it.
The tool is not ready yet. It has just the basic features, but it has now reached the stage when it can actually produce a simple test script+result pair.
For example, This is what I would type to check that the CREATE, INSERT, and SELECT statements are supported (not exhaustive test, of course!)
mysql> start;  # This is a macro from the magic tool
Query OK, 0 rows affected (0.00 sec)

mysql> drop table if exists t1;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> create table t1 (id int, c char(10));
Query OK, 0 rows affected (0.02 sec)

mysql> insert into t1 values (1,'a'), (2,'b');
Query OK, 2 rows affected (0.00 sec)
Records: 2 Duplicates: 0 Warnings: 0

mysql> select * from t1;
+------+------+
| id | c |
+------+------+
| 1 | a |
| 2 | b |
+------+------+
2 rows in set (0.01 sec)

mysql> stop; # another macro. The tool stops recording now
Query OK, 0 rows affected (0.01 sec)

mysql> exit
What I see on the screen is not what I need to get in a test script. If I had found a bug here and I wanted to submit it, I would have to do some cut-and-pasting and clean-up. Instead, the mysql-test-creator is doing that for me.
$ cat creator.test
--disable_warnings
DROP TABLES if exists t1;
--enable_warnings
create table t1 (id int, c char(10));
insert into t1 values (1), (2);
insert into t1 values (1,'a'), (2,'b');
select * from t1;

$ cat creator.result
DROP TABLES if exists t1;
create table t1 (id int, c char(10));
insert into t1 values (1,'a'), (2,'b');
select * from t1;
id c
1 a
2 b
Isn't it sweet?
Bravo Charlie!

More is coming. The tool will support multiple sessions at once, with the creation of a unified test script from several sessions. Stay tuned!