mysql> undo;

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fuzebox
    making it rain
    • Oct 2003
    • 22358

    #1

    mysql> undo;

    Post here if you've ever found yourself wishing for this feature
  • tical
    Confirmed User
    • Feb 2002
    • 6504

    #2
    hehe

    before you do anything crazy always mysqldump

    i learned that the hard way
    112.020.756

    Comment

    • fuzebox
      making it rain
      • Oct 2003
      • 22358

      #3
      Originally posted by tical
      hehe

      before you do anything crazy always mysqldump

      i learned that the hard way
      Hehe yes... On my big production database I usually run a nightly mysqldump as well, has saved my ass before.

      My big problem is with quick little queries, it's happened before, I always stick a semicolon before "WHERE".

      Ie...

      mysql> delete from user ; where id=22;
      Query OK, 122475 rows affected...

      Comment

      • JSA Matt
        So Fucking Banned
        • Aug 2003
        • 5464

        #4
        Originally posted by fuzebox
        mysql> delete from user ; where id=22;
        Query OK, 122475 rows affected...
        LOL Check your queries before pressing enter!

        Comment

        • NickPapageorgio
          Confirmed User
          • Apr 2004
          • 8323

          #5
          Originally posted by fuzebox
          Hehe yes... On my big production database I usually run a nightly mysqldump as well, has saved my ass before.

          My big problem is with quick little queries, it's happened before, I always stick a semicolon before "WHERE".

          Ie...

          mysql> delete from user ; where id=22;
          Query OK, 122475 rows affected...

          Ouch...

          Comment

          • woj
            <&(©¿©)&>
            • Jul 2002
            • 47880

            #6
            Originally posted by fuzebox

            mysql> delete from user ; where id=22;
            Query OK, 122475 rows affected...

            ouch... good thing you had a backup though.. :-/
            Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000
            Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager
            Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager

            Comment

            • s9ann0
              Confirmed User
              • Sep 2001
              • 4873

              #7
              i needed that one time when I put & instead of && in a delete and nuked a whole db

              Comment

              • bawdy
                Confirmed User
                • Feb 2002
                • 1424

                #8
                yeah transactions/rollback and stored procedures would be welcomed additions to mysql... still if u typo and execute the sql you're shit out of luck

                Comment

                • fuzebox
                  making it rain
                  • Oct 2003
                  • 22358

                  #9
                  I think my right pinky finger is faster than any other...

                  My brain thinks "that's not right" but my hand has already executed it.

                  Comment

                  • JDog
                    Confirmed User
                    • Feb 2003
                    • 7453

                    #10
                    Originally posted by fuzebox
                    mysql> delete from user ; where id=22;
                    Query OK, 122475 rows affected...

                    That's great, this is gonna be a mysql horror story thread. I've done the same thing before! It sucks to nuke the whole database.

                    jDoG
                    NSCash now powering ReelProfits.com
                    ALSO FEATURING: NSCash.com :: SoloDollars.com :: ReelProfits.com :: BiminiBucks.com :: VOD
                    PROGRAMS COMING SOON: Greedy Bucks :: Vengeance Cash
                    NOW OFFERING OVER 60 SITES
                    CONTACT :: JAMES SMITH :: CHIEF TECHNOLOGY OFFICER :: ICQ (711385133)

                    Comment

                    • jwerd
                      Confirmed User
                      • Jun 2003
                      • 1953

                      #11
                      Originally posted by NickPapageorgio
                      Ouch...
                      Definately took the words out of my mouth :P
                      Yii Framework Guru - Seasoned PHP vet - Partner @ XXXCoupon.com

                      Comment

                      • Illicit
                        wtf ?
                        • Dec 2003
                        • 11895

                        #12
                        definately
                        Insert Sig Here

                        Comment

                        • Lane
                          Will code for food...
                          • Apr 2001
                          • 8496

                          #13
                          Originally posted by bawdy
                          yeah transactions/rollback and stored procedures would be welcomed additions to mysql... still if u typo and execute the sql you're shit out of luck
                          transactions/rollback is supported for innoDB type tables if i'm not mistaken

                          Comment

                          Working...