MySQL

The world's most popular open source database

Contact a MySQL Representative


  • MySQL.com
  • Developer Zone
  • Partners & Solutions
  • Customer Login
  • DevZone
  • Downloads
  • Documentation
  • Articles
  • Forums
  • Bugs
  • Forge
  • Blogs
 
  • Pages

    • About me
    • Bio
    • Press Release: “Kaj Arnö Appointed MySQL VP of Community Relations”
  • Calendar

    March 2007
    M T W T F S S
    « Feb   Apr »
     1234
    567891011
    12131415161718
    19202122232425
    262728293031  
  • Recent Posts

    • In 2008, I flew 273649 km or 200 times longer than I ran, which was 1382 km
    • Back to work & Personal New Year Resolutions
    • Meet MySQL’s everyday heroes
    • Recipe for celebrating MySQL 5.1 GA
    • MySQL 5.1 is GA — including a behind-the-scenes report
    • Back from Ukraine and Russia
    • Freedom to work anywhere
    • MySQL 5.1 release schedule
    • MySQL 5.1 Use Case Competition: Position 1
    • MySQL 5.1 Use Case Competition: Position 2
    • MySQL 5.1 Use Case Competition: Position 3
    • MySQL 5.1 Use Case Competition: Position 4
    • Career trap: Internet
    • Google Summer of Code 2008 Update
    • Facebook: From 0 to 100 in less than 24h
  • Archives

  • Blogroll

    • Kaj fotografiert
    • No Software Patents!
    • Planet MySQL


  • Tags

    Alexander Arnö Argentina Black Swan Blogging Blogs Brazil Business Model Call for Papers Call for Participation CfP Community Database design David Axmark Dups Event scheduler Football Growth Innovation Ivan Nikitin Language Launch Mårten Mickos Michael "Monty" Widenius MySQL MySQL 5.1 MySQL AB MySQL Forge MySQL User Conference MySQL Users Conference Nassim Nicholas Taleb Open Source Paris Partitioning PostgreSQL Social Networking South Africa Spanish Sun Microsystems Sun Tech Days Thank you Travel Uruguay Use case Web 2.0 Workbench
  • Categories

    • Architecture of Participation
    • Connectors
    • Documentation
    • Events
    • Falcon
    • GPL
    • GUI
    • Licensing
    • MySQL
    • MySQL Cluster
    • MySQL Proxy
    • MySQL Server
    • MySQL Users Conferences
    • MySQL Workbench
    • Photography
    • PHP
    • Release Policy
    • Ruby on Rails
    • Running
    • Summer of Code
    • Sun
    • Sun visits
    • Travel
    • Use cases
    • Virtual company
Observations by Kaj Arnö @Sun
« Launching the Quality Contribution Program
MySQL Dev Mtg Heidelberg 18-24 Sep 2007 »

MySQL University, MEM_ROOT and Pillows

I’m listening to the first MySQL University session. It’s the highest form of education available at MySQL AB, hence the name. Not about how to use MySQL, but how to write code patches for MySQL.

Right now, Sergei Golubchik is sitting in Cologne, Germany, speaking behind Skype Conferencing and two pillows (sound quality!) about memory management and mysys libraries and algorithms. Monty and others are assisting Sergei over our internal IRC, where there are 31 developers listening in.


Our presenter, Sergei Golubchik, in a non-virtual setting

Here’s an IRC transcript:


monty|uni ie, only destructior is called, memory is not freed until free_root()
rafal|school monty|uni: if I initialize String from other String, or char table[] or “string constant”, is memory allocated/deallocated correctly?
iggy|uni serg, While talking about alloc/dealloc for Strings, could you comment on the usefullness of SAFEMALLOC and how to take advantage of it?
monty|uni rafal|school: should be
rafal|school monty|uni: ok (thanks for all answers)
monty|uni Note that String can be both a pointer (like char*) and a C++ like string that holds the string itself
monty|uni If you use it as a pointer, you don’t get it freed. If you use it as a string (or convert it from pointer to string with String.copy(), you need to free it
monty|uni Using delete works on both cases
monty|uni so to be safe, you should just call delete on all String objects.
rafal|school monty|uni: how String can be used as a pointer?
mats|phone monty|uni, So that means that you have to allocate memory for a C string if you are passing it into the String constructor?
monty|uni Default is pointer
monty|uni mats|phone: or you use string.copy()

It’s a challenge. I’m not talking about understanding the routines, like

  • init_alloc_root() - Initalize a MEMROOT object
  • alloc_root() - Allocate an object
  • multi_alloc_root() - Allocate many objects at once
  • free_root() - Free everything

nor about understanding Serg’s accent. Everyone at MySQL has an accent. Our internal language is Bad English, and I feel competent to conform.

The challenge is the low bandwidth. I’m also sitting in Germany, and sadly, it sounds as if Serg were speaking through two pillows.

So why am I writing about this? Because we are planning to open up MySQL University. We are thinking of moving the IRC chat to freenode, and the Wiki pages to the MySQL University Library on MySQL Forge Wiki. The sound already is public, on Skype Conferencing.

With the open MySQL University, those who have an interest in learning about MySQL’s internal code structure can listen in, or follow the MP3 recording later on, or just browse the MySQL University Library. Stay tuned — we hope to be able to open up these weekly sessions later on in March.

This entry was posted on Thursday, March 1st, 2007 at 17:58 and is filed under Architecture of Participation, MySQL, MySQL Server. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply

Observations by Kaj Arnö @Sun is proudly powered by WordPress MU running on Blogs.mysql.com.
Entries (RSS) and Comments (RSS).