1. 07 8月, 2014 2 次提交
    • M
      redis-cli: stop showing incorrectly selected DB · 0042fb0e
      Matt Stancliff 提交于
      Previously redis-cli would happily show "-1" or "99999"
      as valid DB choices.
      
      Now, if the SELECT call returned an error, we don't update
      the DB number in the CLI.
      
      Inspired by @anupshendkar in #1313
      
      Fixes #566, #1313
      0042fb0e
    • M
      redis-cli: Re-attach selected DB after auth · bbc1cd0b
      Matt Stancliff 提交于
      Previously, if you did SELECT then AUTH, redis-cli
      would show your SELECT'd db even though it didn't
      happen.
      
      Note: running into this situation is a (hopefully) very limited
      used case of people using multiple DBs and AUTH all at the same
      time.
      
      Fixes antirez#1639
      bbc1cd0b
  2. 08 7月, 2014 1 次提交
  3. 02 7月, 2014 1 次提交
  4. 27 6月, 2014 1 次提交
  5. 18 6月, 2014 1 次提交
  6. 17 6月, 2014 1 次提交
  7. 23 5月, 2014 1 次提交
  8. 13 3月, 2014 1 次提交
  9. 28 2月, 2014 1 次提交
    • M
      Improved bigkeys with progress, pipelining and summary · 806788d0
      michael-grunder 提交于
      This commit reworks the redis-cli --bigkeys command to provide more
      information about our progress as well as output summary information
      when we're done.
      
       - We now show an approximate percentage completion as we go
       - Hiredis pipelining is used for TYPE and SIZE retreival
       - A summary of keyspace distribution and overall breakout at the end
      806788d0
  10. 25 2月, 2014 6 次提交
  11. 11 2月, 2014 1 次提交
    • M
      Auto-enter slaveMode when SYNC from redis-cli · 21648473
      Matt Stancliff 提交于
      If someone asks for SYNC or PSYNC from redis-cli,
      automatically enter slaveMode (as if they ran
      redis-cli --slave) and continue printing the replication
      stream until either they Ctrl-C or the master gets disconnected.
      21648473
  12. 22 1月, 2014 2 次提交
  13. 26 9月, 2013 1 次提交
  14. 04 9月, 2013 1 次提交
  15. 11 7月, 2013 1 次提交
  16. 03 7月, 2013 2 次提交
    • A
      redis-cli: introduced --pipe-timeout. · 1135e9fa
      antirez 提交于
      When in --pipe mode, after all the data transfer to the server is
      complete, now redis-cli waits at max the specified amount of
      seconds (30 by default, use 0 to wait forever) without receiving any
      reply at all from the server. After this time limit the operation is
      aborted with an error.
      
      That's related to issue #681.
      1135e9fa
    • A
      redis-cli --pipe: send final ECHO in a safer way. · fbb97c6b
      antirez 提交于
      If the protocol read from stdin happened to contain grabage (invalid
      random chars), in the previous implementation it was possible to end
      with something like:
      
      dksfjdksjflskfjl*2\r\n$4\r\nECHO....
      
      That is invalid as the *2 should start into a new line. Now we prefix
      the ECHO with a CRLF that has no effects on the server but prevents this
      issues most of the times.
      
      Of course if the offending wrong sequence is something like:
      
      $3248772349\r\n
      
      No one is going to save us as Redis will wait for data in the context of
      a big argument, so this fix does not cover all the cases.
      
      This partially fixes issue #681.
      fbb97c6b
  17. 11 4月, 2013 2 次提交
    • A
      redis-cli: raise error on bad command line switch. · f8ae70cf
      antirez 提交于
      Previously redis-cli never tried to raise an error when an unrecognized
      switch was encountered, as everything after the initial options is to be
      transmitted to the server.
      
      However this is too liberal, as there are no commands starting with "-".
      So the new behavior is to produce an error if there is an unrecognized
      switch starting with "-". This should not break past redis-cli usages
      but should prevent broken options to be silently discarded.
      
      As far the first token not starting with "-" is encountered, all the
      rest is considered to be part of the command, so you cna still use
      strings starting with "-" as values, like in:
      
          redis-cli --port 6380 set foo --my-value
      f8ae70cf
    • A
      redis-cli: --latency-history mode implemented. · 0280c2f2
      antirez 提交于
      0280c2f2
  18. 23 3月, 2013 1 次提交
    • A
      redis-cli --stat, stolen from redis-tools. · 09aa55a3
      antirez 提交于
      Redis-tools is a connection of tools no longer mantained that was
      intented as a way to economically make sense of Redis in the pre-vmware
      sponsorship era. However there was a nice redis-stat utility, this
      commit imports one of the functionalities of this tool here in redis-cli
      as it seems to be pretty useful.
      
      Usage: redis-cli --stat
      
      The output is similar to vmstat in the format, but with Redis specific
      stuff of course.
      
      From the point of view of the monitored instance, only INFO is used in
      order to grab data.
      09aa55a3
  19. 12 3月, 2013 1 次提交
  20. 06 3月, 2013 1 次提交
  21. 04 3月, 2013 1 次提交
    • A
      redis-cli: use keepalive socket option. · 3b397441
      antirez 提交于
      This should improve things in two ways:
      
      1) Prevent timeouts caused by the execution of long commands.
      2) Improve detection of real connection errors.
      
      This is mostly effective only on Linux because of the bogus default
      keepalive settings. In Linux we have OS-specific calls to set the
      keepalive interval to reasonable values.
      3b397441
  22. 15 2月, 2013 1 次提交
  23. 22 1月, 2013 1 次提交
  24. 19 1月, 2013 1 次提交
  25. 18 1月, 2013 2 次提交
    • J
      Always exit if connection fails. · 59046a73
      Jan-Erik Rediger 提交于
      This avoids unnecessary core dumps. Fixes antirez/redis#894
      59046a73
    • N
      redis-cli --rdb fails if server sends a ping · 1920cab3
      Nathan Parry 提交于
      Redis pings slaves in "pre-synchronization stage" with newlines. (See
      https://github.com/antirez/redis/blob/2.6.9/src/replication.c#L814)
      However, redis-cli does not expect this - it sees the newline as the end
      of the bulk length line, and ends up returning 0 as bulk the length.
      This manifests as the following when running redis-cli:
      
          $ ./src/redis-cli --rdb some_file
          SYNC sent to master, writing 0 bytes to 'some_file'
          Transfer finished with success.
      
      With this commit, we just ignore leading newlines while reading the bulk
      length line.
      
      To reproduce the problem, load enough data into Redis so that the
      preparation of the RDB snapshot takes long enough for a ping to occur
      while redis-cli is waiting for the data.
      1920cab3
  26. 17 1月, 2013 2 次提交
  27. 20 12月, 2012 1 次提交
  28. 09 11月, 2012 1 次提交
  29. 15 7月, 2012 1 次提交