SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Dec 2001
    Location
    Virginia
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MySQL Master Need (DB Problems from ASP Record Insert Pages)

    I think I'm MEMORIZING the MySQL docs, trying to hunt this down problem down. :-)

    Problem: Table Corruption that seems to be caused by
    insert statements not properly closing the table.

    The level of multiuser contention against this table
    is fairly low, but does happen, as recordset queries
    are being run against this table fairly constantly,
    with record inserts happening several hundred times a
    day.

    Using:
    MySQL v3.43.47-win
    MyODBC v2.50.39-nt
    IIS v5.0 on Windows 2000 server
    ASP
    Table type: MyISAM

    I think I've narrowed the problem down: It seems to
    be caused by insert statements not properly closing
    the database table. At any rate, this is from the
    MySQl Manual:

    Code:
    If you get the following warning from CHECK TABLE or myisamchk: 
    
    # clients is using or hasn't closed the table properly
    
    this means that this counter has come out of sync. This doesn't mean that the table is corrupted, but means that you should at least do a check on the table to verify that it's okay.
    This is what I get if I do an insert into the table that's getting corrupted, then do a "CHECK TABLE tab_customer;" within a few seconds afterward.

    Often it will show the error:
    Code:
    IPS.tab_customer | check | warning  | 1 clients is using or hasn't closed the table properly
    IPS.tab_customer | check | error    | Found 7833 keys of 7834
    IPS.tab_customer | check | error | corrupt
    When that happens, queries subsequently run against
    the table from my ASP pages to select a record return
    errors.

    Here's the code I'm using to do the record insert.
    It's pretty straightforward (the code block is
    actually created by MacroMedia UltraDev:

    Code:
        Set MM_editCmd = Server.CreateObject("ADODB.Command")
        MM_editCmd.ActiveConnection = MM_editConnection
        MM_editCmd.CommandText = MM_editQuery
        MM_editCmd.Execute
        MM_editCmd.ActiveConnection.Close
    ...where (of course) MM_editConnection is the
    connection string and MM_editQuery is the SQl
    statement that handles the insert.

    Data IS being correctly inserted. So, why wouldn't
    the table get closed properly?

    Thanks for any help that any of you MySQL masters
    might give!

    -Kevin
    -Camisade

  2. #2
    I have an opinion...
    Join Date
    Sep 2001
    Location
    Barrie, Ontario
    Posts
    324
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have one thing to say:

    If you write the ASP, instead of using Dreamweaver's crappy code, your problem would more than likely be fixed automatically, provided you know ASP.

    I apologize for not being able to help you fix the DW crap, though. Part of my job description is fixing DW and FP code, I can't stand doing it when I don't have to.
    Egotist: A person more interested in himself than in me.
    KodeKrash - Eidix - Barrie LUG


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •