Showing entries 26651 to 26660 of 44109
« 10 Newer Entries | 10 Older Entries »
MySQL - Renaming database

You would hear a big "NO" if you ask some some one about the command to RENAME the DATABASE.

Sometime ago MySQL tried to include the SQL command(This statement was added in MySQL 5.1.7) to rename the database "RENAME {DATABASE | SCHEMA} db_name TO new_db_name;"

but was found to be dangerous and was removed in MySQL 5.1.23. It was intended to enable upgrading pre-5.1 databases to use the encoding implemented in 5.1 for mapping database names to database directory names . However, use of this statement could result in loss of database contents, which is why it was removed. Do not use RENAME DATABASE in earlier versions in which it is present.

Then is there any workaround for this? yes there couple of ways to do this.. below suggestion are given by some of MySQL experts on online forums which I'm including here


A) use …
[Read more]
False assumptions with MySQL

I spent far too much time this past week trying to find out why a Drupal was not  assigning authenticated user permissions to users who clicked on the validation link they were emailed. Instead, it would simply remove the temporary unverified user permission.

It's supposed to do the latter, but then also follow it up with the former. It turns out the problem was a Drupal bug that was triggered by my MySQL setup.

My Drupals all use a server that is a master in a set-up with two masters an three slaves. This has some implications for the auto_increment integer data type. In order to avoid clashes when two masters each insert a new record simultaneously, a master gets a specific instruction about which IDs it may assign.

These instructions specify how many numbers to skip - typically the number of masters in a cluster - and an offset to add, …

[Read more]
False assumptions with MySQL

I spent far too much time this past week trying to find out why a Drupal was not  assigning authenticated user permissions to users who clicked on the validation link they were emailed. Instead, it would simply remove the temporary unverified user permission.

It's supposed to do the latter, but then also follow it up with the former. It turns out the problem was a Drupal bug that was triggered by my MySQL setup.

My Drupals all use a server that is a master in a set-up with two masters an three slaves. This has some implications for the auto_increment integer data type. In order to avoid clashes when two masters each insert a new record simultaneously, a master gets a specific instruction about which IDs it may assign.

These instructions specify how many numbers to skip - typically the number of masters in a cluster - and an offset to add, …

[Read more]
MySQL Performance on Sun Storage 7000

If you saw Don MacAskill's keynote (The Smugmug Tale) at the recent MySQL Conference and Expo, you know that he had lots of positive things to say about his experience running MySQL on the Sun Storage 7410 at Smugmug. The 7410 marks the current high end of the Sun Storage 7000 Unified Storage line of network attached storage devices. For the past few months, I have been investigating MySQL database performance on the entry level and mid-range models, to see whether they might provide similar benefits to smaller MySQL sites. I have to admit that I was more than a little …

[Read more]
MySQL Performance on Sun Storage 7000

If you saw Don MacAskill's keynote (The Smugmug Tale) at the recent MySQL Conference and Expo, you know that he had lots of positive things to say about his experience running MySQL on the Sun Storage 7410 at Smugmug. The 7410 marks the current high end of the Sun Storage 7000 Unified Storage line of network attached storage devices. For the past few months, I have been investigating MySQL database performance on the entry level and mid-range models, to see whether they might provide similar benefits to smaller MySQL sites. I have to admit that I was more than a little …

[Read more]
some useful additions to query generator

I've been on vacation this week, and decided to fine-tune some old QA code. Opened the manual to see the syntax for a select statement, and afterwards added to my random select generator the following:

  • all index hints (force, use, ignore, for join, for order by, for group by)
  • lock in share mode, for update
  • key_block_size for individual indexes
  • hash, btree, rtree for individual indexes
  • unique, fulltext, spatial for indexes

Especially important is the 'lock in share mode' addition. The reason is InnoDB
has many serious bugs with this locking mode (insert ... select, and others) in read committed mode.

So, I don't need multitable delete or update to reproduce those bugs, since I can just do a simple select locking in share mode. For example, the following bugs previously went without proper testcase until I discovered this:

[Read more]
You know you have really screwed up when …

You crash MySQL/Innodb and you trace the error to a function that says:

“This function checks the consistency of an index page when we do not
know the index. This is also resilient so that this should never crash
even if the page is total garbage. ”

Oops… I guess its not that resilient after all:)

Using statpack with SHOW STATUS

Mark Leith, on of the MySQL Support Team managers wrote some time ago a very nice utility I use often called Statpack.

My use of Statpack is very simple. Take two snaphots of SHOW GLOBAL STATUS and compare to produce a text based version of the statistics.

Over time I’ve grown to love it’s simplicity, but notice a number of shortcomings. Being open source there is always the ability to modify, improve and give back. This post is more about detailing those little annoyances that I’d like to improve, or see improved. It is also a means to collate points into one location that I often forget about over time.

I welcome any input, and specifically help in this open source venture.

Here is my wish list that I can currently remember. I do plan to action, time permitting.

  1. In Statement Activity, the total percentages are great to …
[Read more]
Good code is well-formatted code

It was long ago observed that efficiency of code depends on its appearance. Good code is usually readable and quickly understood by colleagues. Of course, code formatting won’t speed up the execution of your queries, but will definitely simplify finding the errors and prevent ambiguity.

Make your code standards-driven and clear for other people using formatting functionality of dbForge Studio for MySQL. Based on your needs, you can benefit from 3 types of formatting:

  • Automatic
  • Manual
  • Using SQL formatter wizard – to format multiple SQL files at once.

By default, when you finish a statement with a delimiter or paste any code fragment, they automatically formatted.

In case you want to format SQL code manually, decide whether you want to format …

[Read more]
Free Software vs. Gratis Software

A lot of folks are unclear on the subtleties of free software and open source. Mike Hogan writes a blog article"Is Hybrid Licensing of OSS Hypocrisy?" to try to shed some light on this. With respect, I think he has missed part of it.We're talking about two orthogonal things here. One is open-source versus closed-source, and the other is whether we charge money for software licenses or not. As

Showing entries 26651 to 26660 of 44109
« 10 Newer Entries | 10 Older Entries »