Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
11.1(EOL)
-
None
Description
SET @schema_obj='{ "type": "object","properties": { "number1":{"type":"number"},"string1":{"type":"string"},"array1":{"type":"array"} },"dependentRequired": { "number1":["string1"] } }'; |
SET NAMES utf8,collation_connection=utf32_bin; |
SELECT JSON_SCHEMA_VALID (@schema_obj,'{"array1":[1,2,3],"number1":2,"string1":"abc"}'); |
Leads to
11.0.2 05d7b41a2b93f84f37563cc59c42cca3daeaf977 (Debug) |
mariadbd: /test/JSON/11.0_dbg/strings/ctype-ucs2.c:2238: my_lengthsp_utf32: Assertion `(length % 4) == 0' failed.
|
11.0.2 05d7b41a2b93f84f37563cc59c42cca3daeaf977 (Debug) |
Core was generated by `/test/JSON/MD290323-mariadb-11.0.2-linux-x86_64-dbg/bin/mariadbd --no-defaults'.
|
Program terminated with signal SIGABRT, Aborted.
|
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
|
[Current thread is 1 (Thread 0x14870f5fa700 (LWP 2202800))]
|
(gdb) bt
|
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
|
#1 0x0000148747f9a859 in __GI_abort () at abort.c:79
|
#2 0x0000148747f9a729 in __assert_fail_base (fmt=0x148748130588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x5574e2f2d1ca "(length % 4) == 0", file=0x5574e2f2d150 "/test/JSON/11.0_dbg/strings/ctype-ucs2.c", line=2238, function=<optimized out>) at assert.c:92
|
#3 0x0000148747fabfd6 in __GI___assert_fail (assertion=assertion@entry=0x5574e2f2d1ca "(length % 4) == 0", file=file@entry=0x5574e2f2d150 "/test/JSON/11.0_dbg/strings/ctype-ucs2.c", line=line@entry=2238, function=function@entry=0x5574e2f2d8d0 <__PRETTY_FUNCTION__.19149> "my_lengthsp_utf32") at assert.c:101
|
#4 0x00005574e2873080 in my_lengthsp_utf32 (cs=cs@entry=0x5574e33929e0 <my_charset_utf32_bin>, ptr=ptr@entry=0x1486ec019547 "number1\":[\"string1\"] } }", length=<optimized out>) at /test/JSON/11.0_dbg/strings/ctype-ucs2.c:2238
|
#5 0x00005574e28730a0 in my_hash_sort_utf32 (cs=0x5574e33929e0 <my_charset_utf32_bin>, s=0x1486ec019547 "number1\":[\"string1\"] } }", slen=<optimized out>, nr1=0x14870f5f7c20, nr2=0x14870f5f7c28) at /test/JSON/11.0_dbg/strings/ctype-ucs2.c:2297
|
#6 0x00005574e2812ee4 in my_ci_hash_sort (nr2=0x14870f5f7c28, nr1=0x14870f5f7c20, len=<optimized out>, key=<optimized out>, ci=<optimized out>) at /test/JSON/11.0_dbg/include/m_ctype.h:1345
|
#7 my_hash_sort (cs=<optimized out>, key=<optimized out>, length=<optimized out>) at /test/JSON/11.0_dbg/mysys/hash.c:48
|
#8 0x00005574e28131ee in my_hash_first (hash=hash@entry=0x14870f5f7cc0, key=0x1486ec019547 "number1\":[\"string1\"] } }", length=7, current_record=current_record@entry=0x14870f5f7c7c) at /test/JSON/11.0_dbg/mysys/hash.c:263
|
#9 0x00005574e2813261 in my_hash_search (hash=hash@entry=0x14870f5f7cc0, key=<optimized out>, length=<optimized out>) at /test/JSON/11.0_dbg/mysys/hash.c:236
|
#10 0x00005574e2018874 in Json_schema_dependent_required::validate (this=<optimized out>, je=<optimized out>, k_start=<optimized out>, k_end=<optimized out>) at /test/JSON/11.0_dbg/sql/sql_string.h:282
|
#11 0x00005574e200356c in Item_func_json_schema_valid::val_int (this=0x1486ec013b78) at /test/JSON/11.0_dbg/sql/item_jsonfunc.cc:4757
|
#12 0x00005574e2051889 in Type_handler::Item_send_long (this=<optimized out>, item=0x1486ec013b78, protocol=0x1486ec001358, buf=<optimized out>) at /test/JSON/11.0_dbg/sql/sql_type.cc:7487
|
#13 0x00005574e205993d in Type_handler_long::Item_send (this=<optimized out>, item=<optimized out>, protocol=<optimized out>, buf=<optimized out>) at /test/JSON/11.0_dbg/sql/sql_type.h:5701
|
#14 0x00005574e1d0cc48 in Item::send (this=0x1486ec013b78, protocol=0x1486ec001358, buffer=0x14870f5f7ff0) at /test/JSON/11.0_dbg/sql/item.h:1235
|
#15 0x00005574e1d43eed in Protocol::send_result_set_row (this=this@entry=0x1486ec001358, row_items=row_items@entry=0x1486ec013520) at /test/JSON/11.0_dbg/sql/protocol.cc:1332
|
#16 0x00005574e1dcc0f9 in select_send::send_data (this=0x1486ec014688, items=@0x1486ec013520: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x1486ec013cb0, last = 0x1486ec013cb0, elements = 1}, <No data fields>}) at /test/JSON/11.0_dbg/sql/sql_class.cc:3102
|
#17 0x00005574e1ec2e06 in select_result_sink::send_data_with_check (sent=0, u=<optimized out>, items=<optimized out>, this=<optimized out>) at /test/JSON/11.0_dbg/sql/sql_class.h:5748
|
#18 JOIN::exec_inner (this=this@entry=0x1486ec0146b0) at /test/JSON/11.0_dbg/sql/sql_select.cc:4761
|
#19 0x00005574e1ec3df6 in JOIN::exec (this=this@entry=0x1486ec0146b0) at /test/JSON/11.0_dbg/sql/sql_select.cc:4672
|
#20 0x00005574e1ec1d03 in mysql_select (thd=thd@entry=0x1486ec000d48, tables=<optimized out>, fields=@0x1486ec013520: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x1486ec013cb0, last = 0x1486ec013cb0, elements = 1}, <No data fields>}, conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2164525824, result=0x1486ec014688, unit=0x1486ec004f90, select_lex=0x1486ec013268) at /test/JSON/11.0_dbg/sql/sql_select.cc:5153
|
#21 0x00005574e1ec2489 in handle_select (thd=thd@entry=0x1486ec000d48, lex=lex@entry=0x1486ec004eb8, result=result@entry=0x1486ec014688, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/JSON/11.0_dbg/sql/sql_select.cc:611
|
#22 0x00005574e1e28969 in execute_sqlcom_select (thd=thd@entry=0x1486ec000d48, all_tables=0x0) at /test/JSON/11.0_dbg/sql/sql_parse.cc:6267
|
#23 0x00005574e1e34b43 in mysql_execute_command (thd=thd@entry=0x1486ec000d48, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/JSON/11.0_dbg/sql/sql_parse.cc:3949
|
#24 0x00005574e1e22d67 in mysql_parse (thd=thd@entry=0x1486ec000d48, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14870f5f9300) at /test/JSON/11.0_dbg/sql/sql_parse.cc:7999
|
#25 0x00005574e1e30399 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x1486ec000d48, packet=packet@entry=0x1486ec00ae29 "", packet_length=packet_length@entry=87, blocking=blocking@entry=true) at /test/JSON/11.0_dbg/sql/sql_class.h:1370
|
#26 0x00005574e1e327d2 in do_command (thd=0x1486ec000d48, blocking=blocking@entry=true) at /test/JSON/11.0_dbg/sql/sql_parse.cc:1407
|
#27 0x00005574e1f96371 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5574e5487258, put_in_cache=put_in_cache@entry=true) at /test/JSON/11.0_dbg/sql/sql_connect.cc:1416
|
#28 0x00005574e1f96840 in handle_one_connection (arg=0x5574e5487258) at /test/JSON/11.0_dbg/sql/sql_connect.cc:1318
|
#29 0x00001487484ab609 in start_thread (arg=<optimized out>) at pthread_create.c:477
|
#30 0x0000148748097133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
|
Attachments
Issue Links
- is caused by
-
MDEV-27128 Implement JSON Schema Validation FUNCTION
- Closed