dbTalk Databases Forums  

Illegal database name?

comp.databases.mysql comp.databases.mysql


Discuss Illegal database name? in the comp.databases.mysql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
SpreadTooThin
 
Posts: n/a

Default Illegal database name? - 01-21-2011 , 10:54 AM






I'm trying to test my database application which uses a mysql
community server.
I'm trying to force the database creation to fail by passing in an
illegal string of characters for the database name.
However the sql statement doesn't generate an error... but it also
doesn't create the database...
I'm developing in REALBasic. The string I'm passing for the database
name is "`~`~`~`".
(For lack of a more ridiculous name.)

I would have thought the create schema statement would have failed..
Maybe this is an issue in RB?

Reply With Quote
  #2  
Old   
Luuk
 
Posts: n/a

Default Re: Illegal database name? - 01-21-2011 , 01:36 PM






On 21-01-11 17:54, SpreadTooThin wrote:
Quote:
I'm trying to test my database application which uses a mysql
community server.
I'm trying to force the database creation to fail by passing in an
illegal string of characters for the database name.
However the sql statement doesn't generate an error... but it also
doesn't create the database...
I'm developing in REALBasic. The string I'm passing for the database
name is "`~`~`~`".
(For lack of a more ridiculous name.)

I would have thought the create schema statement would have failed..
Maybe this is an issue in RB?
try:

mysql> create database `abc def `;
ERROR 1102 (42000): Incorrect database name 'abc def '


--
Luuk

Reply With Quote
  #3  
Old   
SpreadTooThin
 
Posts: n/a

Default Re: Illegal database name? - 01-21-2011 , 02:59 PM



On Jan 21, 12:36*pm, Luuk <L... (AT) invalid (DOT) lan> wrote:
Quote:
On 21-01-11 17:54, SpreadTooThin wrote:

I'm trying to test my database application which uses a mysql
community server.
I'm trying to force the database creation to fail by passing in an
illegal string of characters for the database name.
However the sql statement doesn't generate an error... but it also
doesn't create the database...
I'm developing in REALBasic. *The string I'm passing for the database
name is "`~`~`~`".
(For lack of a more ridiculous name.)

I would have thought the create schema statement would have failed..
Maybe this is an issue in RB?

try:

mysql> create database `abc def `;
ERROR 1102 (42000): Incorrect database name 'abc def '

--
Luuk
no it worked and I have a database called 'abc def'

Reply With Quote
  #4  
Old   
Luuk
 
Posts: n/a

Default Re: Illegal database name? - 01-21-2011 , 03:41 PM



On 21-01-11 21:59, SpreadTooThin wrote:
Quote:
On Jan 21, 12:36 pm, Luuk <L... (AT) invalid (DOT) lan> wrote:
On 21-01-11 17:54, SpreadTooThin wrote:

I'm trying to test my database application which uses a mysql
community server.
I'm trying to force the database creation to fail by passing in an
illegal string of characters for the database name.
However the sql statement doesn't generate an error... but it also
doesn't create the database...
I'm developing in REALBasic. The string I'm passing for the database
name is "`~`~`~`".
(For lack of a more ridiculous name.)

I would have thought the create schema statement would have failed..
Maybe this is an issue in RB?

try:

mysql> create database `abc def `;
ERROR 1102 (42000): Incorrect database name 'abc def '

--
Luuk

no it worked and I have a database called 'abc def'
you forgot to add the last space, after the 'f'...

--
Luuk

Reply With Quote
  #5  
Old   
SpreadTooThin
 
Posts: n/a

Default Re: Illegal database name? - 01-21-2011 , 03:47 PM



On Jan 21, 2:41*pm, Luuk <L... (AT) invalid (DOT) lan> wrote:
Quote:
On 21-01-11 21:59, SpreadTooThin wrote:



On Jan 21, 12:36 pm, Luuk <L... (AT) invalid (DOT) lan> wrote:
On 21-01-11 17:54, SpreadTooThin wrote:

I'm trying to test my database application which uses a mysql
community server.
I'm trying to force the database creation to fail by passing in an
illegal string of characters for the database name.
However the sql statement doesn't generate an error... but it also
doesn't create the database...
I'm developing in REALBasic. *The string I'm passing for the database
name is "`~`~`~`".
(For lack of a more ridiculous name.)

I would have thought the create schema statement would have failed..
Maybe this is an issue in RB?

try:

mysql> create database `abc def `;
ERROR 1102 (42000): Incorrect database name 'abc def '

--
Luuk

no it worked and I have a database called 'abc def'

you forgot to add the last space, after the 'f'...

--
Luuk
Indeed... and as you said that is an illegal database name, however I
get no error in RB.
I think I need to move this thread to the REALBasic forum.
Thanks.

Reply With Quote
  #6  
Old   
Álvaro G. Vicario
 
Posts: n/a

Default Re: Illegal database name? - 01-24-2011 , 02:43 AM



El 21/01/2011 17:54, SpreadTooThin escribió/wrote:
Quote:
I'm trying to test my database application which uses a mysql
community server.
I'm trying to force the database creation to fail by passing in an
illegal string of characters for the database name.
However the sql statement doesn't generate an error... but it also
doesn't create the database...
I'm developing in REALBasic. The string I'm passing for the database
name is "`~`~`~`".
(For lack of a more ridiculous name.)

I would have thought the create schema statement would have failed..
Maybe this is an issue in RB?
I know nothing about REALBasic but I've seen many amateur code snippets
in other langs like PHP that send a query to the server, never check the
return code and even instruct the language to hide all error messages.
Could that be the case? Being a client-server application, MySQL has no
direct way to yell the user.


--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
--

Reply With Quote
  #7  
Old   
SpreadTooThin
 
Posts: n/a

Default Re: Illegal database name? - 01-24-2011 , 11:03 AM



On Jan 24, 1:43*am, "Álvaro G. Vicario"
<alvaro.NOSPAMTH... (AT) demogracia (DOT) com.invalid> wrote:
Quote:
El 21/01/2011 17:54, SpreadTooThin escribió/wrote:

I'm trying to test my database application which uses a mysql
community server.
I'm trying to force the database creation to fail by passing in an
illegal string of characters for the database name.
However the sql statement doesn't generate an error... but it also
doesn't create the database...
I'm developing in REALBasic. *The string I'm passing for the database
name is "`~`~`~`".
(For lack of a more ridiculous name.)

I would have thought the create schema statement would have failed..
Maybe this is an issue in RB?

I know nothing about REALBasic but I've seen many amateur code snippets
in other langs like PHP that send a query to the server, never check the
return code and even instruct the language to hide all error messages.
Could that be the case? Being a client-server application, MySQL has no
direct way to yell the user.

--
--http://alvaro.es- Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web:http://borrame.com
-- Mi web de humor satinado:http://www.demogracia.com
--
It's hard to tell what is going on past the script I'm writing..
I've taken the string that is passed on to the database and broken it
out into discrete lines of sql...
That works... but I'm left wondering why neither of the schemas were
created and no error was generated.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.