Skip to content
  • Rahul Sisondia's avatar
    bc94adeb
    WL#13510 COMPRESSION PROTOCOL FOR ASYNC CLIENT · bc94adeb
    Rahul Sisondia authored
    Description
    -----------
    
    This worklog adds support of compression protocol for asynchronous clients.
    it does not change the wire format used in compressing packets for the usual
    clients.
    
    User need to set the compression algorithm name and if supported compression
    level in the asynchronous client to able the packets compression.
    
    For instance :
    -------------
    
       if (mysql_options(mysql_local, MYSQL_OPT_COMPRESSION_ALGORITHMS,
                         "zstd"))
         exit(1);
    
       if (mysql_options(mysql_local, MYSQL_OPT_ZSTD_COMPRESSION_LEVEL, 4))
         exit(1);
    
       if(mysql_real_connect(mysql_local, opt_host, opt_user, opt_password,
                             current_db, opt_port, opt_unix_socket,
                             client_flag))
         exit(1);
    
       stmt_text = "SELECT col2 FROM test_table";
    
       /* run query in asynchronous way */
       status = mysql_real_query_nonblocking(mysql_local, stmt_text,
                                                (ulong)strlen(stmt_text));
       /* do some other task */
       perform_arithmatic();
       while (status == NET_ASYNC_NOT_READY) {
         status = mysql_real_query_nonblocking(mysql_local, stmt_text,
                                              (ulong)strlen(stmt_text));
       }
    
    Testing
    -------
      - Added following two tests in the testclients/mysql_client_test.cc.
         1. test_wl13510()
         2. test_wl13510_multi_statements()
        Above two tests are verified through main.mysql_client_test file.
    
      - Added MTR test file main.async_compress_client.test
      - Improved the existing big packet tests and added scenarios for
        testing with Nonblocking as well as Nonblocking compress clients.
    
    Worklog PB2 page - mysql-trunk-wl13510
    
    Review
    ------
    RB#23665
    bc94adeb
    WL#13510 COMPRESSION PROTOCOL FOR ASYNC CLIENT
    Rahul Sisondia authored
    Description
    -----------
    
    This worklog adds support of compression protocol for asynchronous clients.
    it does not change the wire format used in compressing packets for the usual
    clients.
    
    User need to set the compression algorithm name and if supported compression
    level in the asynchronous client to able the packets compression.
    
    For instance :
    -------------
    
       if (mysql_options(mysql_local, MYSQL_OPT_COMPRESSION_ALGORITHMS,
                         "zstd"))
         exit(1);
    
       if (mysql_options(mysql_local, MYSQL_OPT_ZSTD_COMPRESSION_LEVEL, 4))
         exit(1);
    
       if(mysql_real_connect(mysql_local, opt_host, opt_user, opt_password,
                             current_db, opt_port, opt_unix_socket,
                             client_flag))
         exit(1);
    
       stmt_text = "SELECT col2 FROM test_table";
    
       /* run query in asynchronous way */
       status = mysql_real_query_nonblocking(mysql_local, stmt_text,
                                                (ulong)strlen(stmt_text));
       /* do some other task */
       perform_arithmatic();
       while (status == NET_ASYNC_NOT_READY) {
         status = mysql_real_query_nonblocking(mysql_local, stmt_text,
                                              (ulong)strlen(stmt_text));
       }
    
    Testing
    -------
      - Added following two tests in the testclients/mysql_client_test.cc.
         1. test_wl13510()
         2. test_wl13510_multi_statements()
        Above two tests are verified through main.mysql_client_test file.
    
      - Added MTR test file main.async_compress_client.test
      - Improved the existing big packet tests and added scenarios for
        testing with Nonblocking as well as Nonblocking compress clients.
    
    Worklog PB2 page - mysql-trunk-wl13510
    
    Review
    ------
    RB#23665
Loading