Bug in MySQL 4.1, InnoDB, Foreign Keys?

Posts   
1  /  2
 
    
swallace
User
Posts: 648
Joined: 18-Aug-2003
# Posted on: 28-Jan-2005 22:25:33   

By the way, Otis, what is the Nederland translation of 'Whoodee doop'?

nirav
User
Posts: 8
Joined: 28-Jan-2005
# Posted on: 28-Jan-2005 23:18:47   

swallace wrote:

You're also correct that there's likely a memory overhead and perhaps speed issue as it thunks the Int64 down to a pair of 32's for each column's row. But, I have to say, I don't see it having an effect, mostly because I don't 'over-SELECT'. Perhaps we could squeeze another 10% out of it, and if CoreLab updates (or fixes) it's drivers we can do that.

I agree, diskspace is not an issue. I'm just concerned about the performance hit. Using long instead of int for every PK - just doesn't seem ideal. But I guess I can live with it- hopefully it will be fixed.

Thanks for your insight, very helpful!

nirav
User
Posts: 8
Joined: 28-Jan-2005
# Posted on: 29-Jan-2005 00:57:05   

swallace wrote:

I leave my PK as INTEGER, which, for some reason, ends up in Designer as DBType BigInt(20) and .NET type System.Int64.

You need to set the FK datatype to BIGINT(20), not as INTEGER, and make sure that FK is SIGNED (or NOT UNSIGNED).

Should work then.

It's some kind of CoreLab translation thing. I don't question it anymore because it works...

simple_smile

I tried this - unfortunately with no luck. BIGINT(20) translates to the System.Decimal datatype, so I don't see the fields during the manual relationship creation. Any ideas what I'm doing wrong? maybe SQL server is the best choice...

swallace
User
Posts: 648
Joined: 18-Aug-2003
# Posted on: 29-Jan-2005 01:12:03   

Remember, make the FK SIGNED (that is, not UNSIGNED).

Post your CREATE TABLE code and we'll take a look...

Thanks for your insight, very helpful!

Glad to help!

simple_smile

nirav
User
Posts: 8
Joined: 28-Jan-2005
# Posted on: 29-Jan-2005 01:18:11   

swallace wrote:

Remember, make the FK SIGNED (that is, not UNSIGNED).

Post your CREATE TABLE code and we'll take a look...

Thanks for your insight, very helpful!

Glad to help!

simple_smile

You are completely right! I read your previous post wrong - thought you meant make it SIGNED or UNSIGNED (depending on what is should be). Should have read it more carefully. This is great!

I'm still a little concerned that I'm creating these bigints all over the place for all the FKs, but what can you do...

Again, I very much appreciated all your help. Would have taken me forever to figure this out. Thanks!

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39884
Joined: 17-Aug-2003
# Posted on: 29-Jan-2005 12:54:02   

Thanks for the help, Scott simple_smile

I'm not sure which translation fo Whoodee doop I should give, something like "Geweldig hoor" with a sarcastic tone wink )

The issue with the FK's/PK's types is a concern. At the moment it's a problem of the DESIGNER that your FK's have to be int64's as well. This will change soon with the upgrade currently in development. The relation designer tries to help you a bit too much in this case, it should just let you create relations, if they don't work, it is your responsibility wink ).

(because you can perfectly join using 2 fields of different types, although you run the risk of having an overflow)

I also don't understand Corelab's decision with autoinc INTEGER (SIGNED) fields to make these int64, even though a new value generated by MySql is always 64bit...

Frans Bouma | Lead developer LLBLGen Pro
vikramka
User
Posts: 42
Joined: 08-Sep-2004
# Posted on: 31-Aug-2005 23:21:45   

Hi guys,

I am about to start using mysql for a project. Have always been using sql server, so I am finding mysql a little bit harder.

Do we still have the problem with relations not being created automatically, and so we have create it in llblgen designer? Are there any other issues, such as difference in using mysql vs sql server w.r.t llblgen?

On the side, does anyone know any good tools to use with mysql,equivalent to sql servr profiler and other handy tools?

Regards...

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39884
Joined: 17-Aug-2003
# Posted on: 01-Sep-2005 10:30:06   

vikramka wrote:

Hi guys,

I am about to start using mysql for a project. Have always been using sql server, so I am finding mysql a little bit harder.

Do we still have the problem with relations not being created automatically, and so we have create it in llblgen designer?

Yes.

Are there any other issues, such as difference in using mysql vs sql server w.r.t llblgen?

No, besides the fact that mysql doesn't have views nor stored procedures, no support for bit/boolean fields.

On the side, does anyone know any good tools to use with mysql,equivalent to sql servr profiler and other handy tools?

I'm not aware of a profiler, but the tools they supply (the admin and the query tool) are pretty ok

Frans Bouma | Lead developer LLBLGen Pro
vikramka
User
Posts: 42
Joined: 08-Sep-2004
# Posted on: 01-Sep-2005 14:48:29   

Thanks Frans,

I bought the corelab 3 driver yesterday. It also had a dbmonitor. Documentation is pretty poor. Can't tell how to use it. Anyone used it yet?

Another thing, they sent me a license number. I guess it is to be used only when contacting them, or do we put it in some license file somewhere?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39884
Joined: 17-Aug-2003
# Posted on: 01-Sep-2005 15:25:39   

vikramka wrote:

Thanks Frans,

I bought the corelab 3 driver yesterday. It also had a dbmonitor. Documentation is pretty poor. Can't tell how to use it. Anyone used it yet?

I never used it, nor opened it (I don't have the biggest version, just the provider)

Another thing, they sent me a license number. I guess it is to be used only when contacting them, or do we put it in some license file somewhere?

Just use that for contacting them. You've been mailed a login for their secure site where you can download the full verrsion. You then don't need to fill in a license (at least I don't recall having to do that). If you contact them, be sure to email with high priority and ask them daily about the progress. They're not that erm ... responsive.

Frans Bouma | Lead developer LLBLGen Pro
1  /  2