Commit graph

3 commits

Author SHA1 Message Date
Oleksandr Byelkin
e3982cead2 MDEV-6066: Merge new defaults from 5.6 and 5.7 (defaults changed, QC can be stopped with no-zero size) 2015-09-04 10:33:56 +02:00
unknown
2048ac0280 5.1-specific changes for bug #26215 after merging the patch from 5.0:
- Added trigger tests back.
- Fixed test cases to match the extended output format of SHOW CREATE ...
- Replaced 'gptr' with 'uchar *'.


client/mysql.cc:
  Replaced 'gptr' with 'uchar *'.
mysql-test/r/mysql_comments.result:
  Fixed test cases to match the extended output format of SHOW CREATE ...
  Added trigger tests back.
mysql-test/t/mysql_comments.sql:
  Added trigger tests back.
2007-11-02 16:40:08 +03:00
unknown
1daa54d697 Fix for:
bug #26215: mysql command line client should not strip comments
              from SQL statements
and
  bug #11230: Keeping comments when storing stored procedures

With the introduction of multiline comments support in the command line
client (mysql) in MySQL 4.1, it became impossible to preserve
client-side comments within single SQL statements or stored routines.
This feature was useful for monitoring tools and maintenance.

The patch adds a new option to the command line client
('--enable-comments', '-c') which allows to preserve SQL comments and
send them to the server for single SQL statements, and to keep comments
in the code for stored procedures / functions / triggers.

The patch is a modification of the contributed patch from bug #11230
with the following changes:
- code style changes to conform to the coding guidelines
- changed is_prefix() to my_strnncoll() to detect the DELIMITER
command, since the first one is case-sensitive and not charset-aware
- renamed t/comments-51.* to t/mysql_comments.*
- removed tests for comments in triggers since 5.0 does not have SHOW
CREATE TRIGGER (those tests will be added back in 5.1).

The test cases are only for bug #11230. No automated test case for bug
#26215 is possible due to the test suite deficiencies (though the cases
from the bug report were tested manually).


client/mysql.cc:
  Applied the contributed patch from bug11230 with the following changes:
  - code style changes to conform to the coding guidelines
  - changed is_prefix() to my_strnncoll() to detect the DELIMITER
  command, since the first one is case-sensitive and not charset-aware
  
  The patch adds a new option to the command line client which allows to
  preserve SQL comments and send them to the server to ensure better
  error reporting and to, keep comments in the code for stored procedures
  / functions / triggers.
mysql-test/r/mysql_comments.result:
  Added test cases for bug11230.
mysql-test/t/mysql_comments.sql:
  Added test cases for bug11230.
mysql-test/t/mysql_comments.test:
  Added test cases for bug11230.
2007-11-02 13:40:34 +03:00