# The point of this test isto make sure that '#', '-- ' and '/* ... */'
# comments, as well as empty lines, are sent from the client to the server.
# This isto ensure better error reporting, andto keep comments in the code
# for stored procedures / functions / triggers (Bug#11230).
# As a result, be careful when editing comments in this script, they do
# matter.
#
# Also, note that this is a script for **mysql**, not mysqltest.
# This is critical, as the mysqltest client interprets comments differently.
# Test tables
#
# t1 is reused throughout the file, and dropped at the end.
# droptableifexists t1; createtable t1 (
id char(16) notnulldefault'',
data intnotnull
);
create function foofct (x char(20))
returns char(20) /* not inside the body yet */ return -- comment 1a
# comment 1b /* comment 1c */
x; # after body, on same line
select foofct("call 1");
showcreate function foofct; drop function foofct;
delimiter |
create function foofct(x char(20))
returns char(20)
begin -- comment 1a
# comment 1b /* comment1c
*/
## These comments are before the create, and will be lost
# Comment 1a -- Comment 1b /* Comment1c
*/ createprocedure foosp() /* Comment not quiet in the body yet */ insertinto test.t1
## These comments are part of the procedure body, and should be kept.
# Comment 2a -- Comment 2b /* Comment 2c */ -- empty line below
-- empty line above values ("foo", 42); # comment 3, still part of the body
## After the ';', therefore not part of the body
# comment 4a -- Comment 4b /* Comment4c
*/
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.26Bemerkung:
(vorverarbeitet am 2026-10-08)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.