• unknown's avatar
    A fix and test case for Bug#5194 "Bulk Insert Failures with Prepared · b197e1f1
    unknown authored
    Statements": 
    - fix a couple of net->buff overruns in libmysql,
    - check in the server that statement parameter count is less than
      65535 (maximum value supported by prepared statements protocol).
     
    
    
    libmysql/libmysql.c:
      Bug#5194 "Bulk Insert Failures with Prepared Statements":
      - clean up my_realloc_str()
      - ensure that net buffer has space when storing null bits and
        parameter typecodes.
    sql/net_serv.cc:
      - set net->last_errno if packet is too big, even on client
        (Why was it ifdefed before?)
    sql/sql_prepare.cc:
      Bug#5194 "Bulk Insert Failures with Prepared Statements":
      - if placeholder count is bigger than 65535, give error.
        We have only 2 bytes reserved for transferring placeholder count
        in 4.1 protocol.
      - can't add a proper error code and message in 4.1 because of
        possible merge difficulties."
    tests/client_test.c:
      A test case for Bug#5194 "Bulk Insert Failures with Prepared 
      Statements".
    b197e1f1
libmysql.c 123 KB