Showing entries 581 to 590 of 693
« 10 Newer Entries | 10 Older Entries »
Displaying posts with tag: drizzle (reset)
More on Day Numbers - The Actual Code

Like I mentioned in my previous article, I've been working on refactoring the temporal data handling in Drizzle. The major problem I've been dealing with is poorly or non-documented code. The lack of documentation has led me to rely on the MySQL Manual in some cases, and then additional research and lastly, my own intuition as to what was going on.

One of the earliest cases of me saying "WTF?" was when I was investigating how day numbers were calculated. Here is the original, unmodified code from MySQL (/libmysql/my_time.c:746-778). I've highlighted in blue the massive amount of comments explaining the inner workings of the function and what it is doing.


/*
  Calculate nr of day since year 0 in new date-system (from 1615)

  SYNOPSIS
    calc_daynr()
    year                 Year (exact 4 digit year, no year conversions)
    month                Month
    day                  Day

  NOTES: 0000-00-00 is a valid date, and will return …
[Read more]
So, What Is a Day Number?

Over the past three weeks, I've been refactoring the way that Drizzle handles temporal, or time-related, values. It's been a fun little adventure into an area of the server which hasn't changed much in a long time. Today, I wanted to share a couple things I've learned about calendars, MySQL, and dealing with date-related calculations.

To start the conversation, imagine a SQL request like the following:

SELECT TO_DAYS("2008-08-11");

My guess is that many people don't really understand what is going on behind the scenes in the SQL server when they issue a request like the above. Believe it or not, there is quite a bit of calculation going on for a simple request like the above. Furthermore, there are a number of caveats that revolve around the ranges of dates that the SQL server operates on.

To demonstrate, without looking at the MySQL manual, can you …

[Read more]
451 CAOS Links 2009.01.09

EMC buys some, but not all, of SourceLabs. Cfengine launches data center automation software. Open source and TCO. Measuring corporate contributions to open source. And more.

Official announcements
Self-repairing Data Center Automation solution released Cfengine

Acquia Joins Red Hat Exchange Bringing Social Publishing Expertise to the Open Source Ecosystem Acquia

DotNetNuke Moves to CodePlex DotNetNuke

The BitRock Network Service Improves Product …

[Read more]
magic number super fun happy time

umm…..

int Field_timestamp::store(double nr)
{
  int error= 0;
  if (nr < 0 || nr > 99991231235959.0)
  {
    set_datetime_warning(DRIZZLE_ERROR::WARN_LEVEL_WARN,
                         ER_WARN_DATA_OUT_OF_RANGE,
                         nr, DRIZZLE_TIMESTAMP_DATETIME);
    nr= 0;                                      // Avoid overflow on buff
    error= 1;
  }
  error|= Field_timestamp::store((int64_t) rint(nr), false);
  return error;
}

(likely the same in mysql as well… haven’t checked though). these date and time things scare me.

Follow Drizzle on Twitter

I've created a Twitter for Drizzle at http://twitter.com/drizzlebugs

Follow it for announcements, bugs reports, and other Drizzle related stuff

Great things afoot in the MySQL community

tl;dr: The MySQL community rocks. Percona, XtraDB, Drizzle, SSD storage, InnoDB IO scalability challenges.

For anyone who lives and dies by MySQL and InnoDB, things are finally starting to heat up and get interesting. I’ve been banging the “MySQL/InnoDB scales poorly” drums for years now, and despite having paid Enterprise licenses, I haven’t been able to get anywhere. I was pretty excited when Sun …

[Read more]
Drizzle progress… (testing can be good)

We’ve been working on fixing up the remaining test cases so that they run with Drizzle. We’ve found: bugs in Drizzle, bugs in MySQL (one that seems to have been there for at least 10 years), bugs in the tests, tests that no longer apply and occationally, something like this:


/* Please god, will someone rewrite this to be readable :( */
if (to->pack_length() == from->pack_length() &&
!(to->flags & UNSIGNED_FLAG && !(from->flags & UNSIGNED_FLAG)) &&
to->real_type() != DRIZZLE_TYPE_ENUM &&
(to->real_type() != DRIZZLE_TYPE_NEWDECIMAL || (to->field_length == from->field_length && (((Field_num*)to)->dec == ((Field_num*)from)->dec))) &&
from->charset() == to->charset() &&
to->table->s->db_low_byte_first == from->table->s->db_low_byte_first &&
(!(to->table->in_use->variables.sql_mode & …

[Read more]
451 CAOS Links 2008.12.19

Red Hat increases its service levels. Linux Foundation appoints Ted Ts’o CTO. Sun delivers VirtualBox update. Novell cancels BrainShare. BBC enables iPlayer for Linux. And more.

Note: This is the last 451 CAOS Links post of 2008. We’ll be back with a bumper holiday special on January 2. Happy holidays!

Official announcements
Red Hat Increases Service Levels and Reduces Costs for Customers with Extended Update Support Red Hat

Linux Foundation Appoints Ted Ts’o to Position of Chief Technology Officer Linux Foundation

[Read more]
Speaker: MySQL Conference & Expo 2009 - O’Reilly Conferences, April 20 - 23, 2009, Santa Clara, CA

Yes, I’m speaking at  the upcoming MySQL Conference & Expo 2009 - on April 20 - 23 (and yes, it’s in Santa Clara again).

I have three sessions:

MySQL Cluster Tutorial: this time with 6.4 feature goodness. Very hands-on, very interactive.

MySQL Cluster on Windows:  (insert witty text about hating operating system freedom here)

Memory Management in MySQL and Drizzle: not magic setting of buffer variables, but memory allocation and management inside the server, a bunch of malloc() discussion and hopefully some interesting numbers.

I Didn't Say "Screw Windows"

A number of commenters on my previous entry thought I was basically saying "Screw Windows". Lukas Smith and Bill Karwin, both of whom I respect enormously, noted that Windows is a dominant development platform for MySQL users, and that one of the reasons for MySQL's popularity was that it runs smoothly (for a while now) on Windows.

Bill and Lukas: You are 100% correct.

That said, what I wrote was this:

Forget Windows for now: Use open source, community-maintained, and standardized libraries within the kernel. Don't rewrite libc and various other quality open source libraries because of Not Invented Here syndrome or because Windows lacks these things. Focus on the standards and don't bother with platforms that don't conform to POSIX. If Microsoft wants future MySQL versions to run on its platforms, partner with Microsoft …

[Read more]
Showing entries 581 to 590 of 693
« 10 Newer Entries | 10 Older Entries »