MCPcopy Create free account
hub / github.com/MariaDB/server / set_conversion_functions

Function set_conversion_functions

sql/sql_prepare.cc:1116–1149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1114}
1115
1116static bool
1117set_conversion_functions(Prepared_statement *stmt, uchar **data)
1118{
1119 uchar *read_pos= *data;
1120
1121 DBUG_ENTER("set_conversion_functions");
1122 /*
1123 First execute or types altered by the client, setup the
1124 conversion routines for all parameters (one time)
1125 */
1126 Item_param **it= stmt->param_array;
1127 Item_param **end= it + stmt->param_count;
1128 THD *thd= stmt->thd;
1129 for (; it < end; ++it)
1130 {
1131 ushort typecode;
1132
1133 /*
1134 stmt_execute_packet_sanity_check has already verified, that there
1135 are enough data in the packet for data types
1136 */
1137 typecode= sint2korr(read_pos);
1138 read_pos+= 2;
1139 if (parameter_type_sanity_check(typecode))
1140 {
1141 DBUG_RETURN(1);
1142 }
1143 (**it).unsigned_flag= MY_TEST(typecode & PARAMETER_FLAG_UNSIGNED);
1144 (*it)->setup_conversion(thd, (uchar) (typecode & 0xff));
1145 (*it)->sync_clones();
1146 }
1147 *data= read_pos;
1148 DBUG_RETURN(0);
1149}
1150
1151
1152static bool setup_conversion_functions(Prepared_statement *stmt,

Callers 2

execute_bulk_loopMethod · 0.85

Calls 4

sint2korrFunction · 0.85
setup_conversionMethod · 0.80
sync_clonesMethod · 0.80

Tested by

no test coverage detected