Zero rows fetch error when executing dump file

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • getmeidea
    New Member
    • Feb 2007
    • 36

    #1

    Zero rows fetch error when executing dump file

    Hi all,

    I have run a batch file contains,
    mysql -uroot -proot -Dsample_db < "create_sp. sql"

    The "create_sp. sql" file contains definition for the stored procedure by the name get_account_det ails()

    Now i opened SQLyog and when I executed get_account_det ails() it generates error with message "zero rows fetched, selected, or processed"

    But when i move to particular procedure and say alter,
    without making any change i will click on execute querry button to alter the procedure.

    Now when I call the sp get_account_det ails(), it returns me some output without any error.

    What is the reason for this error, when i create procedure using, mysql -uroot -proot -Dsample_db < "create_sp. sql" ?

    And how do I solve this problem, because i dont want to again open the SQLyog and locate the sp and run it again ?.
  • werks
    New Member
    • Dec 2007
    • 218

    #2
    Hello..

    Sorry but i'm not really good at MySQL but have you tried Googling it?


    Better Than Yesterday ^^

    Comment

    • code green
      Recognized Expert Top Contributor
      • Mar 2007
      • 1726

      #3
      mysql dump functions can be quirky.
      This doesn't look right
      Code:
      mysql -uroot -proot -Dsample_db < "create_sp.sql"
      No space for the password but space for the user.
      Shouldn't need d.or quotes unless space in file name (or path).
      Code:
      mysql -u root -proot sample_db < create_sp.sql
      Is your username and password the same?
      I have only ever got this function to work using full path names
      to the mysql.exe and the backup file

      Comment

      • getmeidea
        New Member
        • Feb 2007
        • 36

        #4
        Originally posted by code green
        mysql dump functions can be quirky.
        This doesn't look right
        Code:
        mysql -uroot -proot -Dsample_db < "create_sp.sql"
        No space for the password but space for the user.
        Shouldn't need d.or quotes unless space in file name (or path).
        Code:
        mysql -u root -proot sample_db < create_sp.sql
        Is your username and password the same?
        I have only ever got this function to work using full path names
        to the mysql.exe and the backup file
        Hello,

        For running a script file we can give commands in different ways,
        My command: mysql -u<user name> -p<password> -D<database> < "<file name in same directory>"
        The command i have given is right, also the your syntax is correct.
        If you still doubt you can try with the command I have given.

        But my doubt is not about "how to execute a script file". I have explained in my first question.

        If u didn't understand my question, I can explain more deailed.
        Can anyone help me to solve this ?

        Thank you,

        Comment

        • code green
          Recognized Expert Top Contributor
          • Mar 2007
          • 1726

          #5
          My understanding is, and I have read your question again
          you have
          error when executing dump file
          But I must confess I have no idea what the following means
          But when i move to particular procedure and say alter,
          without making any change i will click on execute querry button to alter the procedure.
          Now when I call the sp get_account_det ails(), it returns me some output without any error.
          So I was making an educated guess on your problem.
          Code:
          The command i have given is right, also the your syntax is correct
          No doubt. But there is a difference between correct syntax and working syntax

          Comment

          Working...