Professional Web Applications Themes

Do sourced queries automatically commit? - MySQL

Greetings all, I am trying to track down the cause of some issues I'm having. I am doing this from the mysql prompt: start transaction; source c:/queries.sql; rollback; When I examine the db though, it appears that the changes from the sourced queries have been committed....

  1. #1

    Default Do sourced queries automatically commit?

    Greetings all, I am trying to track down the cause of some issues I'm
    having. I am doing this from the mysql prompt:

    start transaction;
    source c:/queries.sql;
    rollback;

    When I examine the db though, it appears that the changes from the sourced
    queries have been committed.



    Ham Guest

  2. #2

    Default Re: Do sourced queries automatically commit?

    On Sun, 18 Mar 2007 17:31:10 -0700, Ham Pastrami wrote: 

    What type/engine are the affected tables?

    --
    I wish there was a knob on the TV to turn up the intelligence. There's a
    knob called "brightness", but it doesn't work.
    -- Gallagher
    Peter Guest

  3. #3

    Default Re: Do sourced queries automatically commit?


    "Peter H. Coffin" <com> wrote in message
    news:ninehells.com... [/ref]
    sourced 
    >
    > What type/engine are the affected tables?[/ref]

    MyISAM.


    Ham Guest

  4. #4

    Default Re: Do sourced queries automatically commit?

    On 19 Mar, 16:13, "Ham Pastrami" <com> wrote: [/ref]
    > [/ref]
    > [/ref]
    > sourced [/ref]

    >
    > MyISAM.[/ref]

    MyISAM does not support transactions

    Captain Guest

  5. #5

    Default Re: Do sourced queries automatically commit?

    On Mon, 19 Mar 2007 16:13:04 GMT, Ham Pastrami wrote: [/ref]
    > sourced 
    >>
    >> What type/engine are the affected tables?[/ref]
    >
    > MyISAM.[/ref]

    Easy answer then: MyISAM doesn't support transactions, nor rollback. You
    want InnoDB instead. Change all the tables and try it again.

    --
    Christian Biblical literalists are trusting themselves to an archaic English
    translation of a Latin translation of (help me here) Greek? Aramaic? source.
    I wouldn't even trust a VCR manual to make it through that intact. - Dr. Dee
    Peter Guest

  6. #6

    Default Re: Do sourced queries automatically commit?


    "Peter H. Coffin" <com> wrote in message
    news:ninehells.com... 

    Well don't I feel stupid. Thanks for the revelation.


    Ham Guest

  7. #7

    Default Re: Do sourced queries automatically commit?

    On Mon, 19 Mar 2007 21:25:09 GMT, Ham Pastrami wrote: 
    >
    > Well don't I feel stupid. Thanks for the revelation.[/ref]

    *grin* If you make mistakes that have obvious and well-doented
    solutions, you end up being able to fix them quickly and easily. Making
    a really clever and unique mistake may mean *months* of research and
    experimentation to fix. I prefer the easy answers.

    --
    56. My Legions of Terror will be trained in basic marksmanship. Any who
    cannot learn to hit a man-sized target at 10 meters will be used for
    target practice.
    --Peter Anspach's list of things to do as an Evil Overlord
    Peter Guest

Similar Threads

  1. rollback or commit?
    By kt03 in forum Coldfusion - Getting Started
    Replies: 6
    Last Post: October 25th, 08:27 PM
  2. Queries Of Queries Single Quote Problem
    By TimH2O in forum Macromedia ColdFusion
    Replies: 0
    Last Post: April 1st, 07:46 PM
  3. Commit Control
    By Marco in forum Microsoft SQL / MS SQL Server
    Replies: 1
    Last Post: July 5th, 10:36 PM

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139