Planet MySQL Planet MySQL: Meta Deutsch Español Français Italiano 日本語 Русский Português 中文
Showing entries 1 to 10 of 13 3 Older Entries

Displaying posts with tag: refactoring (reset)

Re-factoring some internals of prepared statements in 5.7
Employee +1 Vote Up -0Vote Down

[ this is a re-posting of what I published on the MySQL server team blog a few days ago ]
 
When the MySQL server receives a SELECT query, the query goes through several consecutive phases:

  • parsing: SQL words are recognized, the query is split into different parts following the SQL grammar rules: a list of selected expressions, a list of tables to read, a WHERE condition, …
  • resolution: the output of the parsing stage contains …



  [Read more...]
Poor programming practices
+3 Vote Up -2Vote Down

When will it stop. These amateur programmers that simply cut/paste code really affect those good programmers in the ecosystem trying to make a decent living. I was reviewing a developed (but incomplete) PHP/MySQL system using a common framework (which in itself is irrelevant for this post).

In one source file there were 12 repetitions of the following code:

   //permissions
    $this->security_model->setUserPermissions($id);
    if (!array_key_exists($id,$this->session->userdata['permissions']) OR
        !array_key_exists('id', $this->session->userdata['permissions'][$id]) OR
        !array_key_exists('scope', …
  [Read more...]
Getting rid of huge ibdata file, no dump required, part II
+1 Vote Up -1Vote Down

This post continues Getting rid of huge ibdata file, no dump required, part I, where I describe way of converting your single-tablespace InnoDB database into a file-per-table one, without the pain of exporting and importing everything at once.

In previous part we put aside the issue of foreign keys. We address this issue now.

What if my InnoDB tables have foreign keys?

MyISAM does not support them, so you can't just ALTER an InnoDB table to MyISAM and back into InnoDB, …

  [Read more...]
Getting rid of huge ibdata file, no dump required
+4 Vote Up -1Vote Down

You have been told (guilty as charged), that the only way to get rid of the huge InnoDB tablespace file (commonly named ibdata1), when moving to innodb_file_per_table, is to do a logical dump of your data, completely erase everything, then import the dump.

To quickly reiterate, you can only delete the ibdata1 file when no InnoDB tables exist. Delete this file with an …

  [Read more...]
Resilient Services – Resilient Infrastructure – Site Reliability Engineer
+0 Vote Up -0Vote Down

Modern internet infrastructure are complex.  Components and services are prone to failure.  Resiliency involves building redundancy, best practices and processes into your architecture to make you able to bend and not break.

  • Migrating to cloud service providers
  • Rearchitecting and refactoring applications to scale
  • Scaling the database tier - MySQL and Oracle
  • Building redundancy into every layer
  • Deploying object caches - memcache
  • Deploying page caches - varnish
  • Migrating to Innodb - transactional storage engine
  [Read more...]
MySQL - the best stored routine is the one you don't write
+5 Vote Up -0Vote Down

At Fosdem 2010, already two weeks ago, I had the pleasure of hearing Geert van der Kelen explain the work he has been doing on connecting MySQL and Python. I don't know anything about Python, but anybody that has the courage, perseverance and coding skills to create an implementation of the the MySQL wire protocol from scratch is a class-A programmer in my book. So, I encourage everyone that needs MySQL connectivity for Python programs to check …

  [Read more...]
MySQL: Refactoring a Stored Function
+6 Vote Up -0Vote Down

Hi All!

I was just reading PlanetMySQL and noticed Mike Hillyer's recent post on a user-friendly age function for MySQL. Basically, this function accepts two DATETIME values and returns an indication of the time between the two dates in the form of a human-readable string. For example:

mysql> select  TimeDiffUnits('2001-05-01', '2002-01-01')
+-------------------------------------------+
| …



  [Read more...]
MySQL reengineering project
Employee +4 Vote Up -1Vote Down

Here's another chapter of the MySQL evolution saga.

We know that MySQL today, although hugely popular and effective, has many shortcomings. A Refactoring effort has been announced, after a few months of internal discussions.

The effort is open to external contributions. There is a mailing list for discussing the "what" and the "how" of the new path.

  [Read more...]
MySQL reengineering project
Employee +0 Vote Up -0Vote Down

Here's another chapter of the MySQL evolution saga.

We know that MySQL today, although hugely popular and effective, has many shortcomings. A Refactoring effort has been announced, after a few months of internal discussions.

The effort is open to external contributions. There is a mailing list for discussing the "what" and the "how" of the new path. …

  [Read more...]
MySQL reengineering project
Employee +0 Vote Up -0Vote Down

Here's another chapter of the MySQL evolution saga.

We know that MySQL today, although hugely popular and effective, has many shortcomings. A Refactoring effort has been announced, after a few months of internal discussions.

The effort is open to external contributions. There is a mailing list for discussing the "what" and the "how" of the new path. …

  [Read more...]
Showing entries 1 to 10 of 13 3 Older Entries

Planet MySQL © 1995, 2014, Oracle Corporation and/or its affiliates   Legal Policies | Your Privacy Rights | Terms of Use

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.