Software Outsourcing, Offshore Software Development, Offshore Outsourcing Services, IT Outsourcing, Offshore Development
MySQL manual Offshore Software Outsourcing and Programming, IT Outsourcing Offshore Software Development  
Call Us Today: 1-800-678-9001
Offshore Software Outsourcing and Programming, IT Outsourcing Offshore Software Development

Home / Technical Support / MySQL

Key Offerings:

B2B and B2C E-Business Solutions

Offshore Software Development Outsourcing

Strategic Consulting

Offshore Software Outsourcing

About ALTOROS: ALTOROS Systems is headquartered in Tampa, Florida and maintains an office near Boston, Massachusetts and technology development center in Belarus and Russia. ALTOROS specializes on providing value-added e-commerce and web-based software development and offshore software outsourcing services to emerging enterprises helping them successfully plan and implement business initiatives.

Contact Us for more information.

Node: Bugs, Next: , Prev: Differences from ANSI, Up: Compatibility
Known Errors and Design Deficiencies in MySQL
 
The following problems are known and have a very high priority to get fixed:
 
      ·      ANALYZE TABLE on a BDB table may in some case make the table unusable until one has restarted mysqld.  When this happens you will see errors like the following in the MySQL error file:
 
001207 22:07:56  bdb:  log_flush: LSN past current end-of-log
 
      ·      Don't execute ALTER TABLE on a BDB table on which you are running multi-statement transactions until all those transactions complete.  (The transaction will probably be ignored.)
 
      ·      ANALYZE TABLE, OPTIMIZE TABLE, and REPAIR TABLE may cause problems on tables for which you are using INSERT DELAYED.
 
      ·      Doing a LOCK TABLE ... and FLUSH TABLES ... doesn't guarantee that there isn't a half-finished transaction in progress on the table.
 
      ·      BDB tables are a bit slow to open. If you have many BDB tables in a database, it will take a long time to use the mysql client on the database if you are not using the -A option or if you are using rehash. This is especially notable when you have a big table cache.
 
      ·      The current replication protocol cannot deal with LOAD DATA INFILE and line terminator characters of more than 1 character.
 
The following problems are known and will be fixed in due time:
 
      ·      When using SET CHARACTER SET, one can't use translated characters in database, table, and column names.
 
      ·      If you have a DECIMAL column with a  number stored in different formats (+01.00, 1.00, 01.00), GROUP BY may regard each value as a different value.
 
      ·      DELETE FROM merge_table used without a WHERE will only clear the mapping for the table, not delete everything in the mapped tables.
 
      ·      You cannot build the server in another directory when using MIT-pthreads. Because this requires changes to MIT-pthreads, we are not likely to fix this. See MIT-pthreads.
 
      ·      BLOB values can't "reliably" be used in GROUP BY or ORDER BY or DISTINCT. Only the first max_sort_length bytes (default 1024) are used when comparing BLOBs in these cases.  This can be changed with the -O max_sort_length option to mysqld. A workaround for most cases is to use a substring: SELECT DISTINCT LEFT(blob,2048) FROM tbl_name.
 
      ·      Calculation is done with BIGINT or DOUBLE (both are normally 64 bits long). It depends on the function which precision one gets. The general rule is that bit functions are done with BIGINT precision, IF, and ELT() with BIGINT or DOUBLE precision and the rest with DOUBLE precision.  One should try to avoid using unsigned long long values if they resolve to be bigger than 63 bits (9223372036854775807) for anything else than bit fields!  MySQL Server 4.0 has better BIGINT handling than 3.23.
 
      ·      All string columns, except BLOB and TEXT columns, automatically have all trailing spaces removed when retrieved. For CHAR types this is okay, and may be regarded as a feature according to ANSI SQL92. The bug is that in MySQL Server, VARCHAR columns are treated the same way.
 
      ·      You can only have up to 255 ENUM and SET columns in one table.
 
      ·      safe_mysqld redirects all messages from mysqld to the mysqld log.  One problem with this is that if you execute mysqladmin refresh to close and reopen the log, stdout and stderr are still redirected to the old log.  If you use --log extensively, you should edit safe_mysqld to log to 'hostname'.err instead of 'hostname'.log so you can easily reclaim the space for the old log by deleting the old one and executing mysqladmin refresh.
 
      ·      In the UPDATE statement, columns are updated from left to right.  If you refer to an updated column, you will get the updated value instead of the original value. For example:
 
mysql> UPDATE tbl_name SET KEY=KEY+1,KEY=KEY+1;
 
This will update KEY with 2 instead of with 1.
 
      ·      You can't use temporary tables more than once in the same query.  For example, the following doesn't work:
 
mysql> SELECT * FROM temporary_table, temporary_table AS t2;
 
      ·      RENAME doesn't work with TEMPORARY tables or tables used in a MERGE table.
 
      ·      The optimiser may handle DISTINCT differently if you are using 'hidden' columns in a join or not.  In a join, hidden columns are counted as part of the result (even if they are not shown) while in normal queries hidden columns don't participate in the DISTINCT comparison.  We will probably change this in the future to never compare the hidden columns when executing DISTINCT.
 
An example of this is:
 
SELECT DISTINCT mp3id FROM band_downloads
       WHERE userid = 9 ORDER BY id DESC;
 
and
 
SELECT DISTINCT band_downloads.mp3id
       FROM band_downloads,band_mp3
       WHERE band_downloads.userid = 9
       AND band_mp3.id = band_downloads.mp3id
       ORDER BY band_downloads.id DESC;
 
In the second case you may in MySQL Server 3.23.x get two identical rows in the result set (because the hidden id column may differ).
 
Note that this happens only for queries where you don't have the ORDER BY columns in the result, something that you are not allowed to do in ANSI SQL.
 
      ·      Because MySQL Server allows you to work with table types that don't support transactions, and thus can't rollback data, some things behave a little differently in MySQL Server than in other SQL servers.  This is just to ensure that MySQL Server never needs to do a rollback for a SQL command.  This may be a little awkward at times as column values must be checked in the application, but this will actually give you a nice speed increase as it allows MySQL Server to do some optimisations that otherwise would be very hard to do.
 
If you set a column to an incorrect value, MySQL Server will, instead of doing a rollback, store the best possible value in the column:
 
      -      If you try to store a value outside the range in a numerical column, MySQL Server will instead store the smallest or biggest possible value in the column.
 
      -      If you try to store a string that doesn't start with a number into a numerical column, MySQL Server will store 0 into it.
 
      -      If you try to store NULL into a column that doesn't take NULL values, MySQL Server will store 0 or '' (empty string) in it instead. (This behaviour can, however, be changed with the -DDONT_USE_DEFAULT_FIELDS compile option.)
 
      -      MySQL allows you to store some wrong date values into DATE and DATETIME columns (like 2000-02-31 or 2000-02-00).  If the date is totally wrong, MySQL Server will store the special 0000-00-00 date value in the column.
 
      -      If you set an ENUM column to an unsupported value, it will be set to the error value empty string, with numeric value 0.
 
      -      If you set a SET column to an unsupported value, the value will be ignored.
 
 
      ·      If you execute a PROCEDURE on a query that returns an empty set, in some cases the PROCEDURE will not transform the columns.
 
      ·      Creation of a table of type MERGE doesn't check if the underlying tables are of compatible types.
 
      ·      MySQL Server can't yet handle NaN, -Inf, and Inf values in double. Using these will cause problems when trying to export and import data. We should as an intermediate solution change NaN to NULL (if possible) and -Inf and Inf to the minimum respective maximum possible double value.
 
      ·      LIMIT on negative numbers are treated as big positive numbers.
 
      ·      If you use ALTER TABLE to first add a UNIQUE index to a table used in a MERGE table and then use ALTER TABLE to add a normal index on the MERGE table, the key order will be different for the tables if there was an old key that was not unique in the table. This is because ALTER TABLE puts UNIQUE keys before normal keys to be able to detect duplicate keys as early as possible.
 
The following are known bugs in earlier versions of MySQL:
 
      ·      You can get a hung thread if you do a DROP TABLE on a table that is one among many tables that is locked with LOCK TABLES.
 
      ·      In the following case you can get a core dump:
 
      -      Delayed insert handler has pending inserts to a table.
 
      -      LOCK table with WRITE.
 
      -      FLUSH TABLES.
 
      ·      Before MySQL Server Version 3.23.2 an UPDATE that updated a key with a WHERE on the same key may have failed because the key was used to search for records and the same row may have been found multiple times:
 
UPDATE tbl_name SET KEY=KEY+1 WHERE KEY > 100;
 
A workaround is to use:
 
mysql> UPDATE tbl_name SET KEY=KEY+1 WHERE KEY+0 > 100;
 
This will work because MySQL Server will not use an index on expressions in the WHERE clause.
 
      ·      Before MySQL Server Version 3.23, all numeric types where treated as fixed-point fields. That means you had to specify how many decimals a floating-point field shall have. All results were returned with the correct number of decimals.
 
For platform-specific bugs, see the sections about compiling and porting.
 
Offshore Software Outsourcing company Russia Florida Massachusetts Boston Belarus, Offshore Software Development Services, Offshore Programming and IT OutsourcingOffshore Development, Programming  Services, Tampa FL Russia, E-commerce, Database, CRM, Financial Insurance Health Care Real EstateOffshore Software Development Services, Software Outsourcing Russia
HOME PAGE, Offshore Software Outsourcing Company, offshore IT outsourcing services, offshore 
software development Russia Massachusetts Florida New York CT VT RI software development