Bug #116751 Incomplete error of event/trigger during upgrade from 5.7 to 8.0
| Submitted: | 21 Nov 2024 21:43 | Modified: | 25 Nov 2024 7:26 |
|---|---|---|---|
| Reporter: | Huaxiong Song (OCA) | Email Updates: | |
| Status: | Documenting | Impact on me: | |
| Category: | MySQL Server: Data Dictionary | Severity: | S3 (Non-critical) |
| Version: | 8.0.40 | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | Contribution | ||
[21 Nov 2024 21:43]
Huaxiong Song
[22 Nov 2024 7:47]
Huaxiong Song
In debug mode,creating a trigger or event containing invalid characters in 8.0.40 will cause the instance to crash. For routines, when we try to create sp/func with invalid string, error will be report: RROR 4089 (HY000): Definition of stored routine 'test.f1' contains an invalid utf8mb3 character string: '\xF0\x9F\x90'. Therefore, I think the process of creating triggers and events in 8.0 also needs to check for invalid characters. Execute the SQL in 8.0 debug: CREATE TABLE t1(a int); CREATE TRIGGER trigge1 BEFORE INSERT ON t1 FOR EACH ROW SET @x = (SELECT "trigger🐬"); or CREATE EVENT e1 ON SCHEDULE EVERY 10 HOUR DO SELECT "event🐬"; crash will happen. ```Crash stack mysqld: mysql-server/sql/dd/impl/raw/raw_record.cc:159: bool dd::Raw_record::store(int, const String_type&, bool): Assertion `rc == TYPE_OK' failed. 2024-11-22T07:40:49Z UTC - mysqld got signal 6 ; Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware. BuildID[sha1]=5329f91fa8b98b2ce26df9cb3cf07c7fbb558214 Thread pointer: 0x62700040f900 Attempting backtrace. You can use the following information to find out where mysqld died. If you see no messages after this, something went terribly wrong... stack_bottom = 7fcf7a72a940 thread_stack 0x100000 /flash3/huaxiong.shx/gcc-10.2.0/lib64/libasan.so.6(+0x433a1) [0x7fcf9fbf73a1] /mysql-server/runtime_output_directory/mysqld(my_print_stacktrace(unsigned char const*, unsigned long)+0xbd) [0x5a5dd3a] /mysql-server/runtime_output_directory/mysqld(print_fatal_signal(int)+0x697) [0x378e4ca] /mysql-server/runtime_output_directory/mysqld(handle_fatal_signal+0xa8) [0x378e775] /lib64/libpthread.so.0(+0xf630) [0x7fcf9f9a7630] /lib64/libc.so.6(gsignal+0x37) [0x7fcf9dc2f387] /lib64/libc.so.6(abort+0x148) [0x7fcf9dc30a78] /lib64/libc.so.6(+0x2f1a6) [0x7fcf9dc281a6] /lib64/libc.so.6(+0x2f252) [0x7fcf9dc28252] /mysql-server/runtime_output_directory/mysqld(dd::Raw_record::store(int, std::basic_string<char, std::char_traits<char>, Stateless_allocator<char, dd::String_type_alloc, My_free_functor> > const&, bool)+0xe2) [0x5823fa8] /mysql-server/runtime_output_directory/mysqld(dd::Trigger_impl::store_attributes(dd::Raw_record*)+0x45d) [0x59960d5] /mysql-server/runtime_output_directory/mysqld(dd::Weak_object_impl_<true>::store(dd::Open_dictionary_tables_ctx*)+0x622) [0x59a1326] /mysql-server/runtime_output_directory/mysqld(dd::Collection<dd::Trigger*>::store_items(dd::Open_dictionary_tables_ctx*)+0x413) [0x54f67b9] /mysql-server/runtime_output_directory/mysqld(dd::Table_impl::store_triggers(dd::Open_dictionary_tables_ctx*)+0x359) [0x59742bd] /mysql-server/runtime_output_directory/mysqld(dd::Table_impl::store_children(dd::Open_dictionary_tables_ctx*)+0x86) [0x59743fc] /mysql-server/runtime_output_directory/mysqld(dd::Weak_object_impl_<true>::store(dd::Open_dictionary_tables_ctx*)+0x4bd) [0x59a11c1] /mysql-server/runtime_output_directory/mysqld(bool dd::cache::Storage_adapter::store<dd::Table>(THD*, dd::Table*)+0x3d5) [0x581bfa7] /mysql-server/runtime_output_directory/mysqld(bool dd::cache::Dictionary_client::update<dd::Table>(dd::Table*)+0x748) [0x56b5940] /mysql-server/runtime_output_directory/mysqld(dd::create_trigger(THD*, Trigger const*, enum_trigger_order_type, MYSQL_LEX_CSTRING const&)+0x5a9) [0x559b97e] /mysql-server/runtime_output_directory/mysqld(Table_trigger_dispatcher::create_trigger(THD*, String*, bool, bool&)+0x1342) [0x36ae960] /mysql-server/runtime_output_directory/mysqld(Sql_cmd_create_trigger::execute(THD*)+0x9dc) [0x35e25ba] /mysql-server/runtime_output_directory/mysqld(mysql_execute_command(THD*, bool)+0x73c4) [0x33bfc63] /mysql-server/runtime_output_directory/mysqld(dispatch_sql_command(THD*, Parser_state*)+0xb2c) [0x33c31df] /mysql-server/runtime_output_directory/mysqld(dispatch_command(THD*, COM_DATA const*, enum_server_command)+0x2291) [0x33c5dff] /mysql-server/runtime_output_directory/mysqld(do_command(THD*)+0xa91) [0x33c97ab] /mysql-server/runtime_output_directory/mysqld() [0x376c602] /mysql-server/runtime_output_directory/mysqld() [0x6d95f81] /lib64/libpthread.so.0(+0x7ea5) [0x7fcf9f99fea5] /lib64/libc.so.6(clone+0x6d) [0x7fcf9dcf7b0d] Trying to get some variables. Some pointers may be invalid and cause the dump to abort. Query (60d000392580): CREATE TRIGGER trigge1 BEFORE INSERT ON t1 FOR EACH ROW SET @x = (SELECT "trigger ") Connection ID (thread ID): 8 Status: NOT_KILLED ```
[25 Nov 2024 6:14]
Huaxiong Song
I submitted fixes for bug#116750, bug#116751 and bug#116754 at https://bugs.mysql.com/bug.php?id=116750
[25 Nov 2024 7:26]
MySQL Verification Team
Hello Huaxiong Song, Thank you for the report and contribution. regards, Umesh
[3 Jul 14:48]
MySQL Admin
Posted by developer: Bug status updated to 'Patch pending'
[15 Jul 8:48]
MySQL Admin
Posted by developer: Bug status updated to 'Patch approved'
[27 Jul 14:48]
MySQL Admin
Posted by developer: Bug status updated to 'Patch pending'
[28 Sep 14:48]
MySQL Admin
Posted by developer: Bug status updated to 'Documenting'
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.049 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.