[MDEV-4181] Windows command line crash Created: 2013-02-18  Updated: 2013-02-22  Due: 2013-03-18  Resolved: 2013-02-22

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 5.5.29
Fix Version/s: 5.5.30

Type: Bug Priority: Major
Reporter: Jeff Sadowski Assignee: Vladislav Vaintroub
Resolution: Fixed Votes: 0
Labels: windows
Environment:

Windows only


Attachments: File mysql.exe    

 Description   

When I mess up an sql statement the command line client goes berserk.
Steps to reproduce.
1. Open a windows command line.
2. cd to the location of mysql.exe
3. run mysql.exe
4. type an invalid command like "show tables;" without selecting a database first.

At this point I have to reboot.



 Comments   
Comment by Elena Stepanova [ 2013-02-18 ]

Hi,

Could you please be a bit more specific:

  • what exactly kind of 'berserk' the client goes, what happens?
  • which version of Windows and architecture do you use, and localization, if any?
  • which MariaDB package do you use (zip, msi, 32-bit, 64-bit)?

I just tried 5.5.27 on XP 32-bit and 5.5.29 on Win7 64-bit; in both cases I'm getting a text error message and a beep (an annoying one, I must agree, but that's expected). Nothing hangs, nothing crashes.

Comment by Jeff Sadowski [ 2013-02-18 ]

I'm using the 32 bit version as I only have a 32 bit windows 7 pro.
I am unable to type after an error. It locks up the computer operation. I can switch between programs but am no longer able click. I just get annoying beeps as if a keyboard buffer is full. I have the same issue with mysql as well I was hoping with mariadb it wouldn't do this.

As far as I know I don't have any localization.

Comment by Jeff Sadowski [ 2013-02-18 ]

It only seems to happen on mine. My workmate has the same version of windows 7 pro 32 bit and doesn't have the problem. Only difference I can see is the model he has a dell vostro 3700(i7) and I have a dell vostro 3500(i3)

Comment by Vladislav Vaintroub [ 2013-02-18 ]

if you disable beeping on error, does it hang? aka:

mysql.exe --no-defaults --no-beep -h127.0.0.1 -uroot -p

Comment by Jeff Sadowski [ 2013-02-18 ]

I found some interesting things out that may be related. I uninstalled xampp and mariadb and edited the registry removing any remaining mysql entries and removed all directories with mysql or maria related. Then thinking I had a fresh start I installed mariadb again. Now when I go to the directory with mysql it gived the following error "Error 1045(28000): Access denied for user 'ODBC'@'localhost' (using password:NO)" I'll fix this first and see if it doesn't take care of all my issues.

Comment by Jeff Sadowski [ 2013-02-19 ]

Vladislav Vaintroub: When I run it like that it does not hang. Works beautifully. I can't figure out why it is trying to login with ODBC by default. Where is the local users mysql information kept? someplace in %APPDATA% ?

Comment by Vladislav Vaintroub [ 2013-02-19 ]

Jeff, mysql client is using ODBC if no user is specified (and USER env.variable is not set). It seem legacy historical behavior, but it is happens to be documented here : http://docs.oracle.com/cd/E17952_01/refman-5.0-en/connecting.html
Now, you probably installed MariaDB in such a way that anonymous user is disabled(you can lookup anonymous user in the documentation), thus passwordless ODBC would not by able to login. If you installed ZIP distribution with default/anonymous user, ODBC user w/o password would be able to login.

Comment by Vladislav Vaintroub [ 2013-02-19 ]

But you still have problems if you do not disable beep, right? Would you be able test a patched executable (I have an idea how to fix, but need to test in your environment where beep does not seem to work)?

Comment by Jeff Sadowski [ 2013-02-19 ]

Vladislav Vaintroub: I think I had created a ODBC user before maybe on importing the old database. So all mysteries solved now back to the issue I listed. Your fix works with just the --no-beep set but why would that cause my computer to lock up. I found I can use the windows key and tab to logout while locked. Then log back in.

Comment by Jeff Sadowski [ 2013-02-19 ]

yes I would be glad to test a patched executable.

Comment by Jeff Sadowski [ 2013-02-19 ]

I guess it may have something to do with the "Intel(R) Display Audio" driver. My computer has that my workmate's does not.

Comment by Jeff Sadowski [ 2013-02-19 ]

Note: Removing the audio drivers has no effect. Still crashes without the --no-beep option.

Comment by Jeff Sadowski [ 2013-02-19 ]

I would love a patch. However I have reduced this problem to an exterior problem with the PC speaker. I was following the instructions here http://www.ehow.com/how_5775259_disable-internal-speaker-dell-laptop.html and when tried step 2. it crashed in the exact same way.

Comment by Vladislav Vaintroub [ 2013-02-19 ]

Could you give attached mysql.exe a test? The beep is produces with a different API, and should actually make a Windows sound, rather than make one using system speakers

Comment by Jeff Sadowski [ 2013-02-19 ]

I think your fix would have fixed it for the broken state of my computer. I am sorry but I fixed the original problem thus everything works now. I like your fix much more than the original. Thank you very much for helping me find the root of the problem and for getting away from that dam system bell.

Comment by Jeff Sadowski [ 2013-02-19 ]

I had to restore my computer to factory settings and re install everything. The previous user screwed the computer royally.

Generated at Thu Feb 08 06:54:25 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.