Tracking down strange “Can’t find file” (ER_FILE_NOT_FOUND) Errors

March 9th, 2013

Ever see an error like this in your console or error log, respectively, and wonder where it originated from?

Console (5.5.30):

ERROR 1017 (HY000): Can't find file:
'.\test\select@0020@002a@0020from@0020t1.frm' (errno: 22)

Error Log (5.5.30):

130307 23:22:04 [ERROR] C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld: 
Can't find file: '.\test\select@0020@002a@0020from@0020t1.frm' (errno: 22)

(Fwiw, they are harmless, unless it is indicative of some sql injection – but you may want to sanitize your data better, unless it’s just a one-time user error. Also, if you’re seeing it from the command line, then you’ll likely realize what you did immediately, and thus no need to ‘figure out’ what happened. However, when you *only* see this entry in the error log, and you want to know how that happened after the fact, then this is more relevant.)

At any rate, after searching the code, one can see that “can’t fild file” can originate from several locations, two such being in ./sql/sql_show.cc and ./sql/sql_rename.cc (the code for SHOW CREATE TABLE and RENAME TABLE, respectively).

So, working backwards, I tried both a SHOW CREATE TABLE and RENAME TABLE (with bogus table names), and was able to reproduce the error (because I was wondering how this ended up in an error log I was analyzing):

mysql> SHOW CREATE TABLE `select * from t1`;
ERROR 1017 (HY000): Can't find file: 
'.\test\select@0020@002a@0020from@0020t1.frm' (errno: 22)

mysql> RENAME TABLE `select * from t1` to `t2`;
ERROR 1017 (HY000): Can't find file: 
'.\test\select@0020@002a@0020from@0020t1.frm' (errno: 2)

Note the first *does* get logged to the error log, whereas the second one does not. I’ve filed a bug report about this behavior:

http://bugs.mysql.com/bug.php?id=68618

The only difference between the two errors are the errno values are different for each (22 vs. 2). For reference, here are the meanings for codes 22 and 2 respectively:

C:\Windows\system32>perror 2
OS error code   2:  No such file or directory
Win32 error code 2: The system cannot find the file specified.

C:\Windows\system32>perror 22
OS error code  22:  Invalid argument
Win32 error code 22: The device does not recognize the command.

I will say that in 5.6, the error message is a bit more descriptive by mentioning the text of the “errno”:

Console (5.6.10):

mysql> show create table `select * from t1`;
ERROR 1017 (HY000): Can't find file: 
'.\test\select@0020@002a@0020from@0020t1.frm' (errno: 22 - Invalid argument)
mysql> rename table `select * from t1` to `t2`;
ERROR 1017 (HY000): Can't find file: 
'.\test\select@0020@002a@0020from@0020t1.frm' (errno: 2 - No such file or directory)

Error Log (5.6.10):

2013-03-09 10:33:38 6340 [ERROR]
C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqld:
Can't find file: '.\test\select@0020@002a@0020from@0020t1.frm'
(errno: 22 - Invalid argument)

Hope this helps. :)

 

SkySQL – Looking for APAC Support Engineer

December 10th, 2012

SkySQL is looking for a great Support Engineer to join our Team and work the APAC shift. This means you do not need to reside in APAC, but just want to work those hours. :)

If interested, there is a full description of the position here:

http://www.skysql.com/company/careers/skysql-support-engineer-apac

And as the post says, if you are interested, please send your resume/CV to careers@skysql.com.

Also, if you’d like, please feel free to ping me as well [chris at skysql dot com] and I can try to get your resume looked at with a higher priority (and feel free to ask me any questions too).

Happy Holidays! :)

Database Marketing Manager Position Now Open at SkySQL

August 28th, 2012

SkySQL is Looking for a Senior Marketing Manager for North America!

If you or someone you know is looking for this kind of position, then this is a great opportunity.

I’ll spare all of the details, but if you’re interested, you can read more about the position here:

http://www.skysql.com/content/senior-marketing-manager-north-america

And as always, you can view all of SkySQL’s open positions here (as we’re also looking for Engineers and Consultants):

http://www.skysql.com/company/careers

 

SSL-related MySQL Bug #62743 Fixed Recently

August 17th, 2012

I was very pleased to see that the SSL-related MySQL Bug #62743 was just fixed.

Here is the bug for reference:

http://bugs.mysql.com/bug.php?id=62743

In essence, the –ssl-key value was not validated, thus anything could have been specified there.

Your connection would have still been SSL encrypted, which was good at least, but your SSL Key would not have made any difference.

This fix will be included in versions 5.1.66, 5.5.28, 5.6.7, 5.7.0.

For reference, here is the entry that will go into the changelogs:

“The argument to the –ssl-key option was not verified to exist and be
a valid key. The resulting connection used SSL, but the key was not
used.”

 

SkySQL is Hiring!

June 25th, 2012

SkySQL is hiring! Would you like to join a fast-paced, high-growth company where you’re able to make a difference? Please email us your CV, today, at careers@skysql.com. We look forward to hearing from you!

Here are our current open positions:

QA Engineer

Senior Software Engineer

SkySQL Support Engineer – EMEA

Senior Sales Engineers – EMEA & North America

Senior Consultants – EMEA & North America

For those interested, our full careers page can be found here:

http://www.skysql.com/company/careers

 

SkySQL Raises Additional 2.5 Million Dollars From California Technology Ventures

May 31st, 2012

Yesterday, it was announced that SkySQL has raised an additional 2.5 million dollars in Series A funding from California Technology Ventures.

This comes along with the news of the new CEO, Patrik Sallner, taking the CEO role at SkySQL on July 1st.

Here are some relevant snippets:

“SkySQL also announced today that CTV, a venture capital fund that makes direct investments in technology and life science companies globally, invested an additional $2.5 million as part of the company’s recent A round of funding. With this latest investment, SkySQL has collected EUR 6 million to fund further growth.”

“About California Technology Ventures, LLC
California Technology Ventures, LLC is a venture capital fund that makes direct investments in technology and life science companies. CTV has built a strong reputation for its entrepreneurial approach to investing and working with companies. They believe in guiding entrepreneurs through the strategic, operational, and management decisions critical to a company’s success. For more information, please view www.CTVentures.com.”

If interested, there are much more details on this round of funding here:

http://www.skysql.com/news-and-events/press-releases/…

 

SkySQL Soaring to New Heights

May 31st, 2012

In case you may have overlooked yesterday’s post from Ulf Sandberg, I thought I’d go ahead and reiterate the main points, as it is big news, at least for those interested in SkySQL.

SkySQL has been like a rocket ship with it’s growth since we started, and now we’re making some even bigger changes to help accelerate that effort further.

As Ulf announced, we’ve named a new CEO, Patrik Sallner, to take over after the initial bootstrap period.

Patrik, a former executive at F-Secure, will officially become CEO on July 1st. “Patrik comes to SkySQL with demonstrated experience in building international software and services businesses, including delivering cloud storage solutions to the world’s largest telecommunications operators. The addition of Patrik to SkySQL’s Leadership Team is a tremendous boon to the company, and I have every confidence that he will be instrumental in catapulting SkySQL to the next level.”

Again, I just wanted to share the news for those who may have missed it.

For those interested, more on this can be found here:

http://www.skysql.com/blogs/ulf-sandberg/new-faces-and-funding-take-skysql-cloud

 

Formatting SHOW ENGINE INNODB STATUS outputs when “\n” are embedded as Text

May 30th, 2012

Lately I’ve received a number of SHOW ENGINE INNODB STATUS outputs with embedded “\n” characters appearing as text, but not true line breaks.

Of course this makes reading a long, INNODB STATUS nearly impossible.

With Linux, you can more easily fix this using sed or awk (or if you have those on Windows w/ gnu or cygwin or the like).

I didn’t have either handy, nor a fancy editor (just using WordPad), but I did have a hex editor handy (necessary for such cases as this).

In the hex editor (I use Freeware Hex Editor XVI32 for Windows), fixing this took about 2 seconds.

I just replaced:

5C6E <-- which is the text "\n"

with:

0D0A <-- which is the true carriage return/newline

I realize this is a rather specific issue, but in case you run into it, here is an easy fix.

Hope this helps, and happy INNODB STATUS parsing. :)

 

How to Enable the Original InnoDB Plugin in MariaDB 5.5

May 25th, 2012

As I mentioned here, there is a slight change for enabling the [original] InnoDB Plugin in MariaDB 5.5 (as compared to how you would enable it in 5.1).

Remember, in MariaDB 5.5, if you do not “enable” (i.e., add anything to the config file to do so) the InnoDB Plugin in MariaDB 5.5, you’ll end up with XtraDB+ for your InnoDb plugin. However, if you do “enable” the InnoDB plugin, then you end up with the original InnoDB plugin provided by Oracle/InnoDB.

The change is that the plugin file (.dll for Windows, .so file for Linux) which was previously named “ha_innodb_plugin.dll” is now just “ha_innodb.dll”.

Thus, if you previously enabled the plugin with (would have been in a 5.1 instance):

[mysqld]
ignore_builtin_innodb
plugin-load=innodb=ha_innodb_plugin.dll;innodb_trx=ha_innodb_plugin.dll;
innodb_locks=ha_innodb_plugin.dll;innodb_lock_waits=ha_innodb_plugin.dll;
innodb_cmp=ha_innodb_plugin.dll;innodb_cmp_reset=ha_innodb_plugin.dll;
innodb_cmpmem=ha_innodb_plugin.dll;innodb_cmpmem_reset=ha_innodb_plugin.dll

You now need to use:

[mysqld]
ignore_builtin_innodb
plugin-load=innodb=ha_innodb.dll;innodb_trx=ha_innodb.dll;
innodb_locks=ha_innodb.dll;innodb_lock_waits=ha_innodb.dll;
innodb_cmp=ha_innodb.dll;innodb_cmp_reset=ha_innodb.dll;
innodb_cmpmem=ha_innodb.dll;innodb_cmpmem_reset=ha_innodb.dll

That is the only difference, so after making that change, just restart your instance, and you’ll be in business.

For reference, if you encounter this, you might see an error similar to the following in your error log:

120524 19:24:56 [ERROR] Can't open shared library
 'C:\Program Files\MySQL\MariaDB 5.5\lib\plugin\ha_innodb.dll'
 (errno: 0 The specified module could not be found.)
120524 19:24:56 [ERROR] Couldn't load plugin named 'innodb' with
 soname 'ha_innodb.dll'.
120524 19:24:56 [ERROR] C:/Program Files/MySQL/MariaDB 5.5/bin/mysqld:
 unknown variable 'innodb_buffer_pool_size=10M'
120524 19:24:56 [ERROR] Aborting

Hope this helps.

 

How to Build MariaDB 5.5 on Windows from Source Code

May 25th, 2012

I built MariaDB 5.5.24 on Windows yesterday from source, so I just wanted to share my steps.

Here is the short version:

bzr branch lp:maria/5.5 maria-5.5
cd maria-5.5
mkdir bld
cd bld
cmake .. -G "Visual Studio 10"
cmake --build . --config relwithdebinfo --target package

Done! Nice, neat zip file is created right there.

Here is the longer version with outputs for those interested:

C:\mariadb-5.5>bzr branch lp:maria/5.5 maria-5.5
Connected (version 2.0, client Twisted)
Authentication (publickey) successful!
Secsh channel 1 opened.
Branched 3418 revision(s).

C:\mariadb-5.5>cd maria-5.5

C:\mariadb-5.5\maria-5.5>mkdir bld

C:\mariadb-5.5\maria-5.5>cd bld

C:\mariadb-5.5\maria-5.5\bld>cmake .. -G "Visual Studio 10"
-- Check for working C compiler using: Visual Studio 10
-- Check for working C compiler using: Visual Studio 10 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Visual Studio 10
-- Check for working CXX compiler using: Visual Studio 10 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- MariaDB 5.5.24
-- Check size of void *
-- Check size of void * - done
-- Packaging as: mariadb-5.5.24-win32
-- Looking for include files CMAKE_HAVE_PTHREAD_H
-- Looking for include files CMAKE_HAVE_PTHREAD_H - not found.
-- Found Threads: TRUE
-- Looking for pthread_attr_getguardsize
-- Looking for pthread_attr_getguardsize - not found
-- Check size of time_t
-- Check size of time_t - done
-- Could NOT find Boost
-- Cannot find wix 3, installer project will not be generated
-- Looking for MFC
-- Looking for MFC - not found
-- Configuring done
-- Generating done
-- Build files have been written to: C:/mariadb-5.5/maria-5.5/bld

C:\mariadb-5.5\maria-5.5\bld>cmake --build . --config relwithdebinfo --target package
.......
lots of output
.......
C:\mariadb-5.5\maria-5.5\bld\...
C:\mariadb-5.5\maria-5.5\bld\...
C:\mariadb-5.5\maria-5.5\bld\...

    46 Warning(s)
    0 Error(s)

Time Elapsed 00:23:18.16

Success \o/

Package is named: mariadb-5.5.24-win32.zip

Full location:

C:\mariadb-5.5\maria-5.5\bld\mariadb-5.5.24-win32.zip

C:\Users\Chris>mysql -uroot -pmysql -P3313 -e"select version()"
+----------------+
| version()      |
+----------------+
| 5.5.24-MariaDB |
+----------------+

With XtraDB+ (i.e., InnoDB plugin is not enabled), it starts fine, and uses InnoDB version 1.1.8-24.1.

If you try to enable the original InnoDB plugin, note the library is now named ha_innodb.dll (or ha_innodb.so) instead of ha_innodb_plugin.dll (or ha_innodb_plugin.so), which is what it was named in MySQL/MariaDB 5.1. I discuss this topic in more detail here, if you’re interested.

Hope this helps.

Further resources:

Full Details on CMake here:

http://forge.mysql.com/wiki/CMake

For details on building on Linux, please see here:

http://kb.askmonty.org/en/source-building-mariadb-on-centos/
..

Related Build Links:

 


Period Panties by Period Panteez Menstrual Underwear Menstruation PMS Panty